<< Cluster Analysis Cluster Analysis nan_crosstab >>

NaN Toolbox >> NaN Toolbox > Cluster Analysis > nan_cluster

nan_cluster

constructs T from the agglomerative hierarchical cluster tree, Z, as generated by the nan_linkage function

Calling Sequence

T = cluster(Z,c)

Parameters

Z :

matrix of size (m – 1)-by-3, which is generated by the nan_linkage function

c:

threshold for cutting Z into T

T:

T is a vector of size m containing the cluster assignments of each observation.

Description

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.

Examples

//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)

Authors


Report an issue
<< Cluster Analysis Cluster Analysis nan_crosstab >>