ImLab Scilab Function
Last update :

imfuzzykmeanstrain - fuzzy k-means method, training phase: second step of image segmentation using fuzzy k-means clustering method.

Calling Sequence

[prototype] = imfuzzykmeanstrain(learningdata,classnb[,stopthreshold[,iterationnb[,fuzzyness]]])

Parameters

Description

Thanks to learning data and following fuzzy k-means clustering method, this function creates classes and returns their features in a prototype. The number K of classes is user defined.

Algorithm :

1. The centroids of the classes are initialized.

2. The class membership degrees are calculated for each object.

3. The positions of the K centroids are recalculated.

Steps 2 and 3 are repeated until the centroids no longer move ('stopthreshold' is reached) and at least 'iterationnb' have been done. The result prototype is formed with the centroids of the last iteration. To initialize the centroids, the k-means algorithm is used several times (the centroids are initialized with values from learning data) and the best prototype is kept (this one which minimizes within-class variance and maximizes between-class variance). Note that the distance used is the euclidean one.

See Also

imfuzzykmeansclassify ,   imlearningdata ,