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!