필터 지우기
필터 지우기

output of k means clusters "idx"

조회 수: 3 (최근 30일)
E
E 2019년 7월 17일
댓글: E 2019년 7월 18일
idx = kmeans(X,k)
idx means what ? i read description of function but i still confused
how i can use it
if i need to know the output of each cluster without plot
like cluster 1(4,6,7)
cluster 2(5,7,9)

채택된 답변

Walter Roberson
Walter Roberson 2019년 7월 17일
idx will be a vector which has as many entries as there are rows in X.
The j'th entry, idx(j) tells you the cluster number that X(j,:) belongs to.
which_in_cluster = cell(k,1);
for j = 1 : k
which_in_cluster{j} = find(idx == j);
end
Now which_in_cluster will be a cell array in which the j'th entry is a vector indicating which rows were part of the j'th cluster.
  댓글 수: 1
E
E 2019년 7월 18일
Thank you so much It helps me understand.

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

추가 답변 (0개)

카테고리

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