有关MATLAB中k均值聚类的查询 [英] Query regarding k-means clustering in MATLAB

查看:107
本文介绍了有关MATLAB中k均值聚类的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有大量的矩阵形式的数据.我已经使用MATLAB R2013a中的k-means聚类对其进行了聚类.我想要形成的每个簇的质心的精确坐标.是否可以使用任何公式或其他方法?

I have a very large amount of data in the form of matrix.I have already clustered it using k-means clustering in MATLAB R2013a. I want the exact coordinates of the centroid of each cluster formed.. Is it possible using any formula or anything else?

我想找出每个聚类的质心,以便每当一些新数据到达矩阵时,我就可以计算出它与每个质心的距离,从而找出新数据将属于的聚类

I want to find out the centroid of each cluster so that whenever some new data arrives in matrix, i can compute its distance from each centroid so as to find out the cluster to which new data will belong

我的数据本质上是异构的.因此,很难找到每个群集的平均数据.因此,我正在尝试编写一些代码以自动打印质心位置.

My data is heterogeneous in nature.So,its difficult to find out average of data of each cluster.So, i am trying to write some code for printing the centroid location automatically.

推荐答案

在MATLAB中,使用

In MATLAB, use

[idx,C] = kmeans(..) 

代替

idx = kmeans(..) 

根据文档:

[idx,C] = kmeans(..)返回k-by-p矩阵C中的k个簇质心位置.

[idx,C] = kmeans(..) returns the k cluster centroid locations in the k-by-p matrix C.

这篇关于有关MATLAB中k均值聚类的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆