We have 1D vector say DS of size 1X100, How to apply k-means cluster or c-means cluster and How to find number of clusters,iteration number, standard deviation of each cluster. we tried below code but it is not what we expected answer.

1 回表示 (過去 30 日間)
data = load('fcmdata.dat'); % load some sample data
n_clusters = 2; % number of clusters
[center,U,obj_fcn] = fcm(DS{1,1}', 24);

採用された回答

KSSV
KSSV 2018 年 3 月 13 日
A = randi([1 10],1,100) ;
N = 5 ;
idx = kmeans(A',N) ;
B = cell(N,1) ;
figure
hold on
for i = 1:5
plot(i,A(idx==i),'.','Markersize',20,'color',rand(3,1)) ;
B{i} = A(idx==i) ;
end
Now B has all the clusters......apply your standard deviation on B.
  2 件のコメント
Basavaraja V
Basavaraja V 2018 年 3 月 13 日
Also, We wants every iteration number
KSSV
KSSV 2018 年 3 月 13 日
Read about kmeans. It should be there possibly.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCluster 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