层次聚类与K均值聚类有何不同

如题所述

层次聚类(hierarchical clustering)
这里用最简单的实例说明层次聚类原理和应用方法。
层次聚类是基于距离的聚类方法,MATLAB中通过pdist、linkage、dendrogram、cluster等函数来完成。

K-均值聚类

K-means聚类算法采用的是将N*P的矩阵X划分为K个类,使得所有类内对象与该类中心点之间的距离和最小。

IDX = KMEANS(X, K) partitions the points in the
N-by-P data matrix X
into K
clusters. This partition minimizes the sum, over
all clusters, of
the
within-cluster sums of point-to-cluster-centroid distances.
温馨提示:内容为网友见解,仅供参考
第1个回答  2018-12-30
其实这两个都是想把数据细分下去 只是k要更细分一些 而且数据分析出来误差也会小很多 层次误差应该是在0.1到0.5 k误差是在0.005
相似回答