# Accuracy of Anomaly detection for unlabelled data

Is there a method to calculate how well your model classified outliers in an unlabelled dataset?

I am currently using K-means on a data set by plotting the time against the Speed of a car. There are about 200 cars in a single data set.
Hence, 200 plots in the graph.

Any paper reference or suggestions would help.

Thanks.

• Outliers are rarely presented in a supervised way. Most of the time, outliers are detected using unsupervised methods. This includes setting prior assumptions on the distribution of the data. So first off, you need to define what an outlier is in your data. Also, $k$-means (without regularization) is especially bad on datasets with "outliers." – Alex R. Nov 20 '17 at 18:57

Yes and no. In clustering there are a number of quantifications for how 'successful' a certain unsupervised method has been, e.g. the Silhouette coefficient. To my knowledge, very few papers have been published on this subject in the outlier detection field.

Marques' paper On the internal evaluation of unsupervised outlier detection, is one of them. I am not familiar with a public implementation of that paper's method.

However, one should always be aware of what these methods actually measure. They only measure how well your method matches with the evaluation method's definition of what an outlier is. That is why I said "no" to the question whether there is a nice way of evaluating your problem. As there is no ground truth, you can only describe the data, not evaluate it, at least not in the true sense.

In general, you could check by cross-validation. Outlier detectors (also called novelty detectors) are always trained under the assumption that the outliers are not known, therefore training occurs with only non-oultiers. To use cross-validation in this case, you leave one of the non-outlier points out, train, and make sure that your outlier detector does not label that point as an outlier. Kernel PCA for novelty detection H Hoffmann - Pattern Recognition, 2007 is a very good paper to start your search from.

Also, A review of novelty detection -MAF Pimentel, DA Clifton, L Clifton, L Tarassenko - Signal Processing is a very good review of novelty detection in general.

• Thanks for your answer, @Sam Baker. But can you expand on this line for me please : "To use cross-validation in this case, you leave one of the non-outlier points out, train, and make sure that your outlier detector does not label that point as an outlier." – RPT Nov 20 '17 at 19:26
• How does that let me know the accuracy of my classification of outliers? – RPT Nov 20 '17 at 19:27
• The cross-validation is a measure of how accurate the boundary between outliers/non-outliers is. The idea here is that if you can at least label some of the non-outlers in a training set, you can find the boundary between outliers/non-outliers using novelty detection. – Sam Baker Nov 20 '17 at 19:31