<< CreateDistanceMatrix CLUSTER FuzzyQuantizationError >>

CLUSTER >> CLUSTER > FuzzyCMeans

FuzzyCMeans

performs fuzzy c-means clustering.

Calling Sequence

[Centers, Memberships] = FuzzyCMeans(Samples, InitialCenters, NormType, Criterion, Value, Blending)
[Centers, Memberships] = FuzzyCMeans(Samples, InitialCenters, NormType, Criterion, Value)
[Centers] = FuzzyCMeans(Samples, InitialCenters, NormType, Criterion, Value, Blending)
[Centers, Memberships] = FuzzyCMeans(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

Blending:

exponent applied to memberships. This parameter is optional. The default value is two.

Centers:

resulting cluster centers

Memberships:

membership values of the samples (rows) in the clusters (columns). This parameter is optional.

Description

This function performs fuzzy c-means clustering. For each row of Samples the membership in each cluster given by the corresponding row of InitialCenters is calculated. Then the cluster centers are re-calculated.

The process terminates if the specified number of iterations is performed or the fuzzy 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 Memberships] = FuzzyCMeans(Samples, InitialCenters, 2, 'iterations', 10);
Centers
Memberships(1 : 5, :)
XieBeniIndex = GetXieBeniIndex(Samples, Centers, Memberships, 2)

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
<< CreateDistanceMatrix CLUSTER FuzzyQuantizationError >>