4
$\begingroup$

I want to know after running K-means algorithm on a data set of say 10 variables and getting optimal clusters through Elbow curve--how do I to evaluate the goodness of these clusters (I mean apart from visual review), how do I say quantitatively that these are decently spaced out clusters? Since algorithm will anyway form clusters but what's the measure to say that these are well formed distinct clusters or 'natural groups' like a comparison to standard measure of distance?

And what's the best way to visualize K-means done on multidimensional data? Is it something like TSNE or first doing PCA and then visualizing?

$\endgroup$
8
  • $\begingroup$ KNN is used for classification, K-Means is used for clustering. Which one are your referring to? $\endgroup$
    – Arun Jose
    Commented Apr 4, 2017 at 6:36
  • $\begingroup$ My apologies , I mean K-means . $\endgroup$
    – Pb89
    Commented Apr 4, 2017 at 6:37
  • $\begingroup$ A simple google search would have revealed similar questions on stackoverflow: stats.stackexchange.com/questions/30578/… $\endgroup$
    – Arun Jose
    Commented Apr 4, 2017 at 7:02
  • 2
    $\begingroup$ Possible duplicate of Quantitative evaluation metric of kmeans clustering results $\endgroup$
    – Arun Jose
    Commented Apr 4, 2017 at 7:02
  • $\begingroup$ @Arun Jose- I did have a look at that , but as per my understanding those methods need class labels for evaluation. Perhaps my understanding is incorrect. I'll read more on it . I was looking more from a standard eval metric like when we say p value less <0.05 then its statistically significant , is there something similar to evaluate 'quality of clusters based on how well spaced or differentiated they are' apart from how much variance they explain . $\endgroup$
    – Pb89
    Commented Apr 4, 2017 at 8:31

2 Answers 2

2
$\begingroup$

I recently looked for the best method for clustering comparison and I can safely state that the best one (for independence from the number of clusters and selecting bias in random tests) is the so-called adjusted random index. Other techniques have bloomed around but reading about it seems not necessary because this measure has all the 'good qualities'. A standard article to read about is: Vinh, N. X., Epps, J. & Bailey, J. Information Theoretic Measures for Clusterings Comparison: Variants, Properties, Normalization and Correction for Chance. J. Mach. Learn. Res. 11, 2837–2854 (2010)..

I do not agree with the first answer as the clusteval package has only the simple rand index which is not adjusted for random bias (i.e. tends to be good for large number of clusters really easily - see article). As there are many packages having the ARI measure I tested the efficiencies and the best is hands down the C implementation in phyclust with the RRand() function (phyclust::RRand). It takes microseconds for 150 labeled numbers with 50 clusters.

For the t-sne vs pca go for t-sne. It is like MIC for correlation. Just better. Obviously, it can be cumbersome to calculate for big data-set so pay attention. It is implemented in Rtsne. Check this tutorial out about the two methods compared.

$\endgroup$
1
  • $\begingroup$ I advise you also to check this wonderful post on t-SNE parameters. $\endgroup$
    – Garini
    Commented May 31, 2018 at 8:58
2
$\begingroup$

You can look up Silhouette widths. These are indices of cluster validity, and can help you identify which data points have a poor fit, or which clusters are less cohesive. They also give out a silhouette plot, which is basically the silhouette widths for all data points.

There are several different indices available for cluster validity. If you are conversant with R, lookup the package cluster, cluseval (not sure of the capitalization here).

You can visualize using PCA. You can plot what is called a Biplot (BiplotGUI in R) or a MDS plot, and assign say different colours to data points belonging to different clusters to get a rough visualization of the cluster. But these are not very robust methods, since a lot of information is lost in dimensionality reduction.

$\endgroup$

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.