# Fuzzy C Means results

I'm implementing this algorithm here: http://home.dei.polimi.it/matteucc/Clustering/tutorial_html/cmeans.html

I test my implementation with the following data and config:

2 3 4 10 11 12 13 14 15 16 200001.1 200002.2 200003.3


my fuzzifier is 2, the number of clusters 3, max error: .000001

Looking at the data, the perfect cluster centers would be 3, 13 and 200002.2

BUT, here comes the thing and I'm not really sure my implementation is wrong.

Most of the time, the found centroids are 200002, 13.1326 and 3.09287 which is perfectly fine, BUT sometimes, I have results like: 200001, 200003 and 10. This happens even if I use numbers with smaller difference - for example, using 201, 202 and 203, instead of 200001.1, 200002.2 and 200003.3.

Is this normal? I doubt so.

P.S. I initialize the membership matrix with ( rand() % 9 + 1 ) / 10.0 ). I think this might be my mistake, but is it?

I have in mind:

The algorithm minimizes intra-cluster variance as well, but has the same problems as k-means; the minimum is a local minimum, and the results depend on the initial choice of weights.

from the wiki article, but I receive only these 2 results and the difference in both results is very significant.

EDIT So, when I run the test with

2 3 4 10 11 12 13 14 15 16 21.1 2.2 23.3


the results are perfectly fine. So, this makes me think about some kind of normalization of the data. I tried

x = ( x - min ) / ( max - min )


but it didn't helped at all.

-