<< CLUSTER CLUSTER CreateDistanceMatrix >>

CLUSTER >> CLUSTER > CMeans

CMeans

performs c-means clustering

Calling Sequence

[Centers] = CMeans(Samples, InitialCenters, NormType, Criterion, Value)

Parameters

Samples:

matrix that includes sample vectors as rows

InitialCenters:

matrix that includes initial cluster centers as rows

NormType:

norm of vectors, must be a scalar greater than zeros, can be %inf

Criterion:

name of termination condition, can be 'iterations' or 'quantization_error'

Value:

number of iterations or maximum quantization error

Centers:

resulting cluster centers

Description

This function performs c-means clustering. For each row of Samples the nearest neighbor among InitialClusterCenters is searched. The new center of a cluster is the mean of its members.

The process terminates if the specified number of iterations is performed or the quantization error does not exceed a specified maximum.

If the termination condition is fullfilled from the beginning, Centers == InitialCenters

Examples

global CLUSTER_PATH;
Source = read_csv(CLUSTER_PATH + 'demos\IrisData.csv', ascii(9));
Samples = strtod(Source(:, 1 : 4));
InitialCenters = SelectRandomly(Samples, 5);
Centers = CMeans(Samples, InitialCenters, 2, 'iterations', 10)

See also

Authors

Bibliography

Richard O. Duda, Peter E. Hart, David G. Stork, 'Pattern Classification', John Wiley & Sons Inc., New York, Chichester, Weinheim, Brisbane, Singapore, Toronto, Second Edition, 2001


Report an issue
<< CLUSTER CLUSTER CreateDistanceMatrix >>