Main Content

Construct agglomerative clusters from linkages

defines clusters from an agglomerative hierarchical cluster tree `T`

= cluster(`Z`

,`'Cutoff'`

,`C`

)`Z`

.
The input `Z`

is the output of the `linkage`

function for an input data matrix `X`

.
`cluster`

cuts `Z`

into clusters, using
`C`

as a threshold for the inconsistency coefficients (or `inconsistent`

values) of nodes in the tree. The output `T`

contains cluster assignments of each observation (row of `X`

).

If you have an input data matrix `X`

, you can use `clusterdata`

to perform agglomerative clustering and return cluster indices for
each observation (row) in `X`

. The `clusterdata`

function
performs all the necessary steps for you, so you do not need to execute the `pdist`

, `linkage`

, and `cluster`

functions separately.