echo off, clc %CLSTRDMO Demonstrates the CLUSTER function for dendrograms % Copyright % Barry M. Wise % 1993 % Modified…
K-Means 源代码
k均值聚类算法(k-meansclusteringalgorithm)是一种迭代求解的聚类分析算法,其步骤是,预将数据分为K组,则随机选取K个对象作为初始的聚类中心,然后计算每个对象与各个种子聚类中心之间的距离,把每个对象分配给距离它最近的聚类中心。聚类中心以及分配给它们的对象就…
echo off, home %CLSTRDMO Demonstrates the CLUSTER function for dendrograms %Copyright Eigenvector Research 1993-2000 %Modifie…
function [x,esq,j] = kmeans(d,k,x0) %KMEANS K-means 舅绊府硫阑 捞侩茄 氦磐 剧磊拳 [X,ESQ,J]=(D,K,X0)%涝仿 牢磊: % D 单捞磐 氦磐(one per row) % K 吝缴 肮…
function [centers,clusters,errors,ind] = kmeans_clusters(sD, n_max, c_max, verbose) % KMEANS_CLUSTERS Clustering with k-means wit…
%PREX_MATCHLAB PRTools example on K-MEANS clustering and matching labels % % Illustrates the use of K-MEANS clustering and the m…
function [centers,clusters,errors,ind] = kmeans_clusters(sD, n_max, c_max, verbose) % KMEANS_CLUSTERS Clustering with k-means wit…
// ***** 定义结构体和类 ***** struct aCluster { double *Center; int *Member; //属于该聚类的样本列表 int …
%PREX_MATCHLAB PRTools example on K-MEANS clustering and matching labels % % Illustrates the use of K-MEANS clustering and the m…
function [CODE_n, label, dist] = vq(X, CODE, n_it, QUIET) %vq Vector quantization using the K-means (or LBG) algorithm. % …
%PREX_MATCHLAB PRTools example on K-MEANS clustering and matching labels % % Illustrates the use of K-MEANS clustering and the m…