Assigning a new data point to a cluster in hierarchical clustering
19 views (last 30 days)
I have clustered my data X with hierarchical clustering in the following way:
Y = pdist(X);
Z = linkage(Y);
T = cluster(Z,'maxclust',2);
How can I determine to which cluster a new data point (not in X) should be assigned to? For k-means one can just assign the data point to the cluster with the nearest centroid but for hierarchical clustering I don't see how to do it.
MHN on 4 May 2016
If you know your maxclust is 2, then just use 2-means. Hierarchical clustering and linkage will give you an insight about the number of natural clusters in your data. When you found that k' (e.g. using 'cutoff') based on hierarchical clustering, you can use k'-mean.