0
$\begingroup$

I want to use the Local Outlier Factor (LOF) algorithm for outlier detection but it simply finds outliers on unlabed data as whole and you do not need to have a training and test set. However in my case I expect to get some knowledge from the training set and test this knowledge on test data (it seems like an ordinary classification problem :) ). Is there any way to use the LOF or any other anomaly detection algorithm via training and test set? At least, how can I get some statistics for my test set specifically? What is the methodology of using these with separated data?

$\endgroup$
  • $\begingroup$ how are your test/training set constructed? For example, are they random partition of the same dataset or are they coming from two temporally disjoint datasets (e.g. the test set is composed of observations samples before a certain date and the train set of observations after that date)? $\endgroup$ – user603 Feb 26 '13 at 22:21
1
$\begingroup$

If you have training data, you might want to look at one-class classification methods, such as one-class SVM.

$\endgroup$
0
$\begingroup$

The answer is no, LOF is not appropriate for your problem. LOF is an unsupervised outlier detection method. Now, the features you select and the distance metric you pick for your graph naturally determine part of what it means for a point to be further from its neighbors than they are from each other, but at the end of the day, what you need to do is just train a good ol' supervised classifier. Someone suggested SVM, you might also look at boosted trees, random forest, neural nets, logistic regression, etc.

$\endgroup$
0
$\begingroup$

You can try this paper [1]. This work is about matching train and test distribution matching and estimation of density ratio $P_{test}(x)/P_{train}(x)$. However, it is designed in such a way that instead of computing the density ratio of train to test, it computes density ratio of train to some convex combination of train and test distribution i.e $\alpha P_{train} + (1 - \alpha)P_{test}$. Now, by setting $\alpha$ close to 1, they are able to do outlier detection and in fact it is one of their experiments in their paper.

Now, this method does not use the training set labels, but just the training set points. As @Anony-Mousse has already pointed above (+1), you can also try out one-class SVMs for the same as well, which can use the labels.

[1] Relative Density-Ratio Estimation for Robust Distribution Comparison
Paper: http://arxiv.org/abs/1106.4729
Matlab code : http://www.kecl.ntt.co.jp/icl/ls/members/myamada/RuLSIF.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.