How to estimate K for K-means clustring
古いコメントを表示
I'm working on unsupervised classification or clustering, i want to estimate the K (which refers to cluster number) before starting th k-means algorithm
採用された回答
その他の回答 (3 件)
the cyclist
2016 年 5 月 15 日
0 投票
This is not really a MATLAB question, but rather a general data science question.
Googling "how to choose k in k means" found this Wikipedia page on the topic (and many others) that might help you.
4 件のコメント
wisekily
2016 年 5 月 15 日
the cyclist
2016 年 5 月 15 日
編集済み: the cyclist
2016 年 5 月 15 日
I don't know of any methods in MATLAB to help you choose K, other than plotting results post hoc to see how different choices of K did. See, for example, this page.
Image Analyst
2016 年 5 月 15 日
There are MATLAB functions for estimating the best k. I don't remember what they were - I'd have to look them up in the Machine Learning course notes.
wisekily
2016 年 5 月 15 日
Image Analyst
2016 年 5 月 15 日
0 投票
The web page on kmeans explains how you can use silhouette() to determine the best number of clusters, k:
3 件のコメント
wisekily
2016 年 5 月 16 日
Walter Roberson
2016 年 5 月 16 日
Did you read through the link that Image Analyst posted?
the cyclist
2016 年 5 月 16 日
Which is also the same link that I pointed you to earlier. So, uh, now you have 3 of the top 10 contributors to this forum telling you consistently the same thing.
kira
2019 年 5 月 2 日
old question, but I just found a way myself looking at matlab documentation:
klist=2:n;%the number of clusters you want to try
myfunc = @(X,K)(kmeans(X, K));
eva = evalclusters(net.IW{1},myfunc,'CalinskiHarabasz','klist',klist)
classes=kmeans(net.IW{1},eva.OptimalK);
1 件のコメント
Bashar Saad
2019 年 7 月 12 日
could you help me pleas the code is not clear
カテゴリ
ヘルプ センター および File Exchange で Cluster Analysis and Anomaly Detection についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!