Clustering variables with outliers - Cross Validated most recent 30 from 2019-07-17T08:43:40Z 1 Clustering variables with outliers Ken 2012-04-16T20:03:49Z 2016-02-08T19:06:42Z <p>I am performing a cluster analysis in SAS and some of the variables that I am trying to cluster contain outliers. I've tried to transform the data (log and/or standardize them) but didn't quite work out. </p> <p>So, for example, let's say I came down to 9 clusters, then one or two clusters will have just one value in them. Deleting outliers is not optional due to the nature of my work.</p> <p>I want to assign a set of values into groups so that values in the same clusters are more similar (in some sense or another) to each other than to those in other clusters however, if I decrease the number of clusters and basically merge the outliers group with other groups I'm afraid that the merged group won't be homogeneous.</p> <p>Thus, to sum up my questions, how can I deal with outliers for cluster analysis?</p> <p>Thanks in advance!</p> 3 Answer by Anony-Mousse for Clustering variables with outliers Anony-Mousse 2012-04-18T04:34:29Z 2012-04-18T07:03:28Z <p>Which clustering algorithm did you try?</p> <p>k-means is known to not work very well with noise. Hierarchical clustering is very likely to produce single-element clusters. That's outliers, nothing wrong with that. Or you might try DBSCAN, in which the "N" stands for "Noise". That algorithm actually is designed to be able to handle some noise objects. You can look up details on <a href="" rel="nofollow">Wikipedia</a>.</p> 0 Answer by Wayne for Clustering variables with outliers Wayne 2016-02-08T19:03:33Z 2016-02-08T19:03:33Z <p>"Deleting outliers is not optional due to the nature of my work."</p> <p>Did you mean "Deleting outliers is not an option, due to the nature of my work."?</p> <p>If you can delete outliers, you can do so before clustering, or you can delete clusters with too few (presumably outlier) members, or you can use a clustering algorithm that doesn't force points into clusters -- such as DBSCAN, recommended in Anony-Mousse's answer. It all depends on how you know something's an outlier, and thus at what point in this process you're declaring it an outlier.</p>