# Validation of clustering results

I have a data which contains several columns which I later reduced using a PCA algorithms to two different components. I then applied the k-means algorithms to the data.
Now, how can I verify that my data clustered well into each group? Or how do I determine misclassification rate?

For instance, using R, if I check the cluster vector say k\$cluster against the labels of the data I had previously before clustering can I just draw a confusion matrix from that and assume that 1 in the clustered vector is equivalent to 1 in my labels?

col3    col2     Col1   lables
123     2.32      2.50    0
124    2.81      3.10     1
125    2.72      3.09     2
126    2.92      3.03     3
127    2.32      2.95     4


Please note this is a hypothetical data; my data is way bigger than this.

-
You're speaking of assessing "misclassification". Do you mean that you had some classification of observations prior clustering, and now you want to compare that classification to the one given by clustering? –  ttnphns Sep 15 '11 at 6:08
yes that is what I know. –  persistence911 Sep 15 '11 at 10:15
Are you sure the cluster labels correspond to each other? I.e. that cluster A is cluster A in both custerings? And do you have equal number of clusters on the first place? –  mbq Sep 15 '11 at 11:19
There is a prior classification and One of the things I am confused about is can I safely assumes that A cluster vector in 1 generated after clustering will be equal to my label 1. Or How can i know if the cluster classification corresponds a little to my previous labels prior to clustering. –  persistence911 Sep 15 '11 at 11:26
For a real example of scrambled clusters, see how-to-calculate-classification-error-rate on SO. –  denis Apr 19 '12 at 15:00

One classic approach is the adjusted Rand index, which is a chance-corrected measure of similarity between two partitions (a clustering is, after all, a partition). This is already implemented in R, in the mclust package (see here). This value of the adjusted Rand index always lies between -1 and 1, and the index is not a metric (e.g., it doesn't satisfy the triangle inequality). It has the nice property of being able to compare partitions of different sizes (i.e., clusterings containing different numbers of clusters).

-
@micans, do you have any idea if there is any implementation of VI criteria in R? if yes what package? –  doctorate Nov 16 at 14:05