splitting data based on cluster indices
2 次查看(过去 30 天)
显示 更早的评论
Hello so I have customer data where I used kmeans clustering. It partitioned the data into 4 different clusters. If I have customer ids A = [1:1600] and the cluster indexes for each of theses 1600 customer ids. How can I separate the data so that I can view which customers are in each of the specific clusters.
0 个评论
回答(1 个)
Walter Roberson
2016-11-29
results = cell(4,1);
for K = 1 : 4
results{K} = A( cluster_indices == K );
end
另请参阅
类别
在 Help Center 和 File 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!