3
$\begingroup$

I have a set with several features that I wish to cluster using Kmeans. If I remove a point that is an outlier on one dimenssion but not in the others will it affect the result?

Outliers were found using Tukey method on every dimension.

$\endgroup$

2 Answers 2

1
$\begingroup$

K-means is sensitive to outliers. These will often become 1-element clusters etc., So removing them can be a good idea.

In general, k-means makes most sense when you have lots of data, enough to reliably estimate centers. Then removing a few points completely should not make much of a difference. You can add back the removed points later and check how much they would affect the means.

If you have noisy data, it is however not clear that the overall assumptions of k-means hold (every point belongs to exactly one cluster; clusters have the same extends). On noisy data methods such as DBSCAN tend to work better that have an integrated concept of "noise", and which separate clusters by density, not by distance from the centers.

There are also k-means variants that have built-in functionality to ignore outliers. You may want to try these; the standard k-means is actually one of the worst choices.

$\endgroup$
3
  • $\begingroup$ You are right, I have 440 points and only removing 20. It's a small percentage that probably won't affect the outcome negatively. $\endgroup$ Commented Jul 16, 2018 at 15:55
  • $\begingroup$ 440 is tiny (in particular once you split this into k clusters), and 20 can have quite some effect. With lots of data I meant 100.000 for example. $\endgroup$ Commented Jul 16, 2018 at 18:13
  • $\begingroup$ I removed 5, only those points that appeared on 2 or more features. $\endgroup$ Commented Jul 17, 2018 at 17:39
1
$\begingroup$

It probably will but that is why you are removing it in the first place? Since kmean is distance/similarity based, I expect it will affect the result but in a positive way.

$\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.