kMeansClustering

VQ (vector quantization) of K-means clustering using Forgy's batch-mode method

Contents

Syntax

Description

center = kMeansClustering(data, clusterNum, plotOpt) returns the centers after k-means clustering, where

[center, assignment, distortion, allCenter] = kMeansClustering(data, clusterNum, plotOpt) also returns assignment and distortion, where

Example

DS=dcData(2);
centerNum=16;
plotOpt=1;
[center, assignment, distortion] = kMeansClustering(DS.input, centerNum, plotOpt);
Iteration count = 1/200, distortion = 63.274343
Iteration count = 2/200, distortion = 39.763397
Iteration count = 3/200, distortion = 37.346312
Iteration count = 4/200, distortion = 36.323913
Iteration count = 5/200, distortion = 35.948277
Iteration count = 6/200, distortion = 35.826302
Iteration count = 7/200, distortion = 35.759025
Iteration count = 8/200, distortion = 35.717937
Iteration count = 9/200, distortion = 35.679391
Iteration count = 10/200, distortion = 35.659650
Iteration count = 11/200, distortion = 35.639169
Iteration count = 12/200, distortion = 35.591131
Iteration count = 13/200, distortion = 35.491004
Iteration count = 14/200, distortion = 35.451197
Iteration count = 15/200, distortion = 35.413559
Iteration count = 16/200, distortion = 35.406382
Iteration count = 17/200, distortion = 35.404516
Iteration count = 18/200, distortion = 35.404516

See Also

vecQuantize, vqDataPlot.


Top page   Next: interpViaGaussian.m   Prev:kMeansClusteringOnDist.m