Assigning a new data point to a cluster in hierarchical clustering

조회 수: 7 (최근 30일)
Sepp
Sepp 2016년 5월 3일
댓글: Sepp 2016년 5월 4일
Hello
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
MHN 2016년 5월 4일
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.
  댓글 수: 1
Sepp
Sepp 2016년 5월 4일
Thanks for your answer. I don't know that maxclust has to be 2, it was just an example. How can I find out which number of clusters my data naturally has with hierarchical clustering?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by