How to estimate K for K-means clustring
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (3)
the cyclist
il 15 Mag 2016
0 voti
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 Commenti
wisekily
il 15 Mag 2016
the cyclist
il 15 Mag 2016
Modificato: the cyclist
il 15 Mag 2016
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
il 15 Mag 2016
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
il 15 Mag 2016
Image Analyst
il 15 Mag 2016
0 voti
The web page on kmeans explains how you can use silhouette() to determine the best number of clusters, k:
3 Commenti
wisekily
il 16 Mag 2016
Walter Roberson
il 16 Mag 2016
Did you read through the link that Image Analyst posted?
the cyclist
il 16 Mag 2016
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
il 2 Mag 2019
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 Commento
Bashar Saad
il 12 Lug 2019
could you help me pleas the code is not clear
Categorie
Scopri di più su Cluster Analysis and Anomaly Detection in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!