constructs T from the agglomerative hierarchical cluster tree, Z, as generated by the nan_linkage function
T = cluster(Z,c)
matrix of size (m – 1)-by-3, which is generated by the nan_linkage function
threshold for cutting Z into T
T is a vector of size m containing the cluster assignments of each observation.
T = cluster(Z,c) constructs T from the agglomerative hierarchical cluster tree, Z, as generated by the nan_linkage function. Z is a matrix of size (m – 1)-by-3, where m is the number of observations in the original data. c is a threshold for cutting Z into T. T are formed when a node and all of its subnodes have inconsistent value less than c. All leaves at or below the node are grouped into a cluster. T is a vector of size m containing the cluster assignments of each observation.
//Compare clusters from Fisher iris data with species: loadmatfile(nan_getpath()+"/demos/data/iris.mat"); d = nan_pdist(meas); Z = nan_linkage(d); c = nan_cluster(Z,145); nan_crosstab(c,species) | ![]() | ![]() |