필터 지우기
필터 지우기

Determining the optimal number of clusters in Kmeans technique

조회 수: 25 (최근 30일)
som
som 2013년 5월 24일
답변: kira 2019년 5월 2일
I have a matrix like "A". I want to cluster its data using K-Means method.
A=[45 58 59
46 76 53
57 65 71
40 55 59
25 35 42
34 51 74
46 90 53
46 63 60
33 50 78
53 57 60
31 28 72
49 49 53
76 88 82
34 100 198
35 35 35];
I used the following command to cluster data.
[Data_clustred, c]= kmeans(A,num_cluster);
by the way, knowing the optimal number of cluster is neccessary to me.
Is there any criteria that determines the optimal numbers of clusters? if so, How can I write its programm.
any help whould be appreciated. Thanks in advance.

채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 5일
  댓글 수: 1
som
som 2014년 2월 6일
편집: som 2014년 2월 6일
Thanks for your answer. Do you have a complete MATLAB code for K-means algorithm? I mean a code that be able to import a data set, do clustering and export cluster data? Thanks in advance

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

min ho lee
min ho lee 2014년 2월 5일
  댓글 수: 1
som
som 2014년 2월 6일
Thanks for the file. Can I ask you to email the pdf file of your answer i.e. "Community detection by signaling on complex networks.pdf" to the following email: [ anvari.t@gmail.com] Thanks in advance

댓글을 달려면 로그인하십시오.


kira
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);

카테고리

Help CenterFile 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!

Translated by