0
$\begingroup$

I have to perform pairwise correlations and clustering on the rows of a matrix like the following:

c v1 v2 v3 ... vn
c1 1.00 0.98 0.97 ... 0
c2 1.00 0.95 0.94 ... 0
c3 1.00 0.98 0.95 ... 0
c4 1.00 0.93 0.91 ... 0

Basically I have n sorted vectors with values [1.00,0.90] that represent the variation of some values in the columns. Since I'm interesting since in the number of non-zero values in each rows and in the variations, I performed the K-means algorithm on the above matrix and on the same but with values normalized between [0,1], to show in a better way low differences among values in each row. The algorithm returns different clusters for the two matrix. Anyone can help me in understanding why the clusterization is different, since I'm starting with the same number of clusters, and the number of non-zero elements in each row in both matrices is the same. Only the "scale" of the values in each row is changed.

$\endgroup$
2
$\begingroup$

k-means is a randomized algorithm.

Run it twice on the exact same data, and you may still get different results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.