AUTO CLUSTERING instead of setting the value of 'C' in Fuzzy C-Mean
2 次查看(过去 30 天)
显示 更早的评论
I have a problem in FCM. i want it to be AUTO CLUSTERING instead of setting the value of 'C'?. This is a normal FCM code that need manually set the C: options = [NaN 100 0.001 0]; [centers,U,objFun] = fcm(data,3,options);
0 个评论
采纳的回答
Walter Roberson
2016-12-8
Yes, I know exactly how to get the best possible results in that situation: set the number of clusters to the number of unique points. Every cluster will then contain exactly one point (and any duplicates of it), which will always give you the best possible fitting, with no fitting error at all.
3 个评论
Walter Roberson
2016-12-9
The following does the best possible clustering without specifying the number of clusters in advance:
[cluster_centers, ~, cluster_idx] = unique(YourInputMatrix, 'rows');
That is the entire code. Every unique row becomes its own cluster.
The error in cluster assignment is provably 0.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Clustering 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!