用Mathematica对数据进行聚类分析
1、给出一组数据:
a = RandomReal[{-10, 10}, 20];
聚类:
FindClusters[a]
Mathematica把这组数据分为两类。

2、如果希望分为不多于4类,需要指定分组:
FindClusters[a, 4]

3、随机给出一组平面上的点集:
a = RandomReal[{-10, 10}, {10000, 2}];
分成三类,并画图:
b = FindClusters[a, 3];
ListPlot[%, AspectRatio -> Automatic]

4、分成8类。

5、三维空间的点分成三类,并用凸包分隔。


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:185
阅读量:64
阅读量:113
阅读量:162
阅读量:92