Effacer les filtres
Effacer les filtres

Sort items to existing cluster groups

1 vue (au cours des 30 derniers jours)
elamanue
elamanue le 11 Oct 2011
I applied Y = pdist(X); Z = linkage(Y,'ward'); to cluster my items X. Afterwards, I defined the optimum number of groups. Now, I have additional items Y which I want to sort to the already existing groups received from clustering X. What's the best way to do this? How can I define the 'borders' of the existing groups?

Réponse acceptée

Lucio Cetto
Lucio Cetto le 20 Oct 2011
Use the function cluster to give a cluster idx to each sample in X:
C = cluster(Z,'MaxClust',number_of_groups);
Then find the closest sample for each new observation in W,
C(knnsearch(X,W,'k',1))
You may want also to look at knnclassify for more elaborated voting schemes. See also clusterdata that wraps pdist, linkage and cluster in one function call.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by