Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to get cluster more than 2 if i have :

1 回表示 (過去 30 日間)
Steven Pranata
Steven Pranata 2019 年 12 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Y1 = mvnpdf(X,mu1,sigma1);
Y2 = mvnpdf(X,mu2,sigma2);
Y3 = mvnpdf(X,mu3,sigma3);
Cluster1 = Y1 > Y2;
Cluster2 = ~Cluster1;
Cluster3 = ??????
  1 件のコメント
Image Analyst
Image Analyst 2019 年 12 月 15 日
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 = ??????

回答 (2 件)

Walter Roberson
Walter Roberson 2019 年 12 月 7 日
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 件のコメント
Walter Roberson
Walter Roberson 2019 年 12 月 7 日
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 2019 年 12 月 7 日
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 2019 年 12 月 7 日
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