Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to get cluster more than 2 if i have :

1 vue (au cours des 30 derniers jours)
Steven Pranata
Steven Pranata le 7 Déc 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
Y1 = mvnpdf(X,mu1,sigma1);
Y2 = mvnpdf(X,mu2,sigma2);
Y3 = mvnpdf(X,mu3,sigma3);
Cluster1 = Y1 > Y2;
Cluster2 = ~Cluster1;
Cluster3 = ??????
  1 commentaire
Image Analyst
Image Analyst le 15 Déc 2019
Original question
How to get cluster more than 2 if i have :
Y1 = mvnpdf(X,mu1,sigma1);
Y2 = mvnpdf(X,mu2,sigma2);
Y3 = mvnpdf(X,mu3,sigma3);
Cluster1 = Y1 > Y2;
Cluster2 = ~Cluster1;
Cluster3 = ??????

Réponses (2)

Walter Roberson
Walter Roberson le 7 Déc 2019
Cluster1 = Y1 > Y2 & Y1 > Y3 & Y2 > Y3
Cluster2 = Y1 > Y2 & Y1 > Y3 & Y2 <= Y3
Cluster3 = Y1 > Y2 & Y1 <= Y3 %Y2 < Y3 by transitive
Cluster4 = Y1 <= Y2 & Y1 > Y3 %Y2 > Y3 by transitive
Cluster5 = Y1 <= Y2 & Y1 <= Y3 & Y2 > Y3
Cluster6 = Y1 <= Y2 & Y1 <= Y3 & Y2 <= Y3
Or use kmeans() with the number of clusters that you want.
Caution: kmeans will always return the number of clusters you ask for, even if it does not make sense for the data.
  3 commentaires
Walter Roberson
Walter Roberson le 7 Déc 2019
Pick any three of those.
Note that there is a difference between finding three clusters, versus finding three meaningfull clusters.
If your mu* values are well separated, you could probably use the mu* values as the locations around which clusters would be expected to form. If you were to sort the mu values, ms1, ms2, ms3, then you could form clusters "value <= (ms1+ms2)/2, (ms1+ms2)/2 <= value < (ms2+ms3)/2, value >= (ms2+ms3)/2 . These would, however, not necessarily represent equal areas.
Walter Roberson
Walter Roberson le 7 Déc 2019
I doubt that you want to be comparing Y1 to Y2 or Y3. I think you want to be throwing all of the values into one basket, [Y1, Y2, Y3] and then trying to form clusters that can distinguish which of the three sources the values came from.

Image Analyst
Image Analyst le 7 Déc 2019
Just define Cluster3 to be something. What would you want it to be? It could be virtually anything you direct it to be.

Community Treasure Hunt

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

Start Hunting!

Translated by