K均值 && 模糊c均值

matlab帮助--统计工具箱--Multivariate Statistics--clusteranalysis,里面是实例,K-mean和c-mean是一回事
在help-search中搜  fuzzy cluster,就有相应函数了,fcm

clusterT= kmeans(mm',clusternum);%mm' 为样本按行排列,clusternum聚类总数
cluster=find(clusterT==i);%找到每个聚类中具体样本的位置
%i=1.....clusternum

下面是函数使用说明
kmeans K-means clustering SyntaxIDX = kmeans(X,k)
[IDX,C] = kmeans(X,k)
[IDX,C,sumd] = kmeans(X,k)
[IDX,C,sumd,D] = kmeans(X,k)
[...] = kmeans(...,'param1',val1,'param2',val2,...)
DescriptionIDX = kmeans(X, k) partitions the points in the n-by-p data matrix X into k clusters. This iterative partitioning minimizes the sum, over all clusters, of the within-cluster sums of point-to-cluster-centroid distances. Rows of X correspond to points, columns correspond to variables. kmeans returns an n-by-1 vector IDX containing the cluster indices of each point. By default, kmeans uses squared Euclidean distances.

 

 

模糊C-均值聚类的函数是fcm,

fcm函数是一个反复迭代运算,并建立在initfcm函数(处始化)、distfcm函数(距离计

算)和stepfcm函数(迭代步数)上的函数。 函数如下:

[CENTER, U, OBJ_FCN] = FCM(DATA, N_CLUSTER)

中文帮助说明如下:

CENTER:聚类中心

U:每一个数据点的隶属等级

OBJ_FCN:迭代更新的历史

DATA:原始的数据

N_CLUSTER:分类数目

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值