2
$\begingroup$

I have a dataset with 3 variables: A, B and C. Now, A and B are ordinal variables (i.e.; the result of two questions measured using a 5-point Likert), whereas B is continuous.

A and B are also correlated, Spearman rho = .50, p-value = 0.0046

I want to partition my dataset in 3 cluster using kmeans (the default R implementation). Does the fact that some of the variables in my dataset are correlated violates any assumptions for running the algorithm?

$\endgroup$
2
  • $\begingroup$ No, k-means does not require uncorrelated variables. It, however, assumes that clusters in the data are convex and more or less spherical. $\endgroup$
    – ttnphns
    Commented Aug 18, 2014 at 15:25
  • $\begingroup$ See also identical question stats.stackexchange.com/q/244149/3277 $\endgroup$
    – ttnphns
    Commented Nov 4, 2016 at 14:12

1 Answer 1

3
$\begingroup$

Removing correlations is a best practise (whitening), but not required.

Non-continuous variables however tend to yield bad results with k-means, even after whitening. Due to the clearly cut gaps in non-continuous data, these gaps tend to dominate the k-means clustering result much more than any structure in continuous attributes.

$\endgroup$
2
  • $\begingroup$ Does this hold if the variables are normalised? $\endgroup$
    – dfucci
    Commented Aug 21, 2014 at 11:09
  • 1
    $\begingroup$ They will still only have a low finite number of different values, won't they? It does not matter if the gap between values is always exactly 1, or if it is smaller. Adding appropriate random jitter, and running the process multiple times, may help. Or inflating your data: adding 10+ copies of each data point to your data set; then adding different random jitter to each copy. $\endgroup$ Commented Aug 21, 2014 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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