【问题标题】:fuzzy c means in matlabmatlab中的模糊c表示
【发布时间】:2010-12-18 15:31:17
【问题描述】:

我在 matlab 中使用内置的模糊 c 均值算法对一些数据进行聚类,该算法返回 C 聚类中心,U 模糊分区矩阵。所以我知道 C 中的集群中心是什么,但我如何才能确定每个数据点属于哪个集群中心?使用模糊分区矩阵或其他方式?

【问题讨论】:

    标签: cluster-analysis


    【解决方案1】:

    我知道这是一个非常古老的问题,但如果我给出答案,其他人可能会觉得有帮助。

    以下示例来自 Matlab 帮助。示例中有 2 个集群。

    index1 是属于簇 1 的数据点的索引,index2 类似。因此,使用这些信息很容易获得您需要的信息。


    data = rand(100, 2);
    [center,U,obj_fcn] = fcm(data, 2);
    plot(data(:,1), data(:,2),'o');
    maxU = max(U);
    index1 = find(U(1,:) == maxU);
    index2 = find(U(2, :) == maxU);
    line(data(index1,1),data(index1, 2),'linestyle','none',...
         'marker','*','color','g');
    line(data(index2,1),data(index2, 2),'linestyle','none',...
         'marker', '*','color','r');
    

    【讨论】:

      猜你喜欢
      • 2011-12-03
      • 2011-11-29
      • 1970-01-01
      • 2014-08-20
      • 2010-09-11
      • 2013-08-29
      • 2016-08-15
      • 1970-01-01
      相关资源
      最近更新 更多