How to find optimal k from k means clustering by using elbow method

116 vues (au cours des 30 derniers jours)
Pradya Panyainkaew
Pradya Panyainkaew le 8 Jan 2018
Modifié(e) : KSSV le 11 Fév 2021
I want to find optimal k from k means clustering by using elbow method . I have 100 customers and each customer contain 8689 data sets. How can I create a program to cluster this data set into appropriate k groups.

Réponse acceptée

kira
kira le 2 Mai 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);

Plus de réponses (1)

Saranya  A
Saranya A le 8 Mar 2018
Modifié(e) : KSSV le 11 Fév 2021
This function will help you to find the optimum number of clusters. https://in.mathworks.com/matlabcentral/fileexchange/49489-best-kmeans-x-

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by