yzhao062 / pyod

A Python Library for Outlier and Anomaly Detection, Integrating Classical and Deep Learning Techniques
http://pyod.readthedocs.io
BSD 2-Clause "Simplified" License
8.33k stars 1.35k forks source link

Can OC-SVM include both normal and anomalous instances as input ? #125

Open sudershan1903 opened 5 years ago

sudershan1903 commented 5 years ago

The data that I have consists of both normal and anomalous instances, but with no labels. Can One class SVM be used in this case? If not which algorithm in PyOD would be more suitable?

yzhao062 commented 5 years ago

Of course you could. Even we assume for novelty detection tasks the input data only contains normal points, it is never the case in practice.

So it is fine to use ocsvm. Another advice is to try various models -- trials and errors may work better than picking a model by the data assumption for anomaly detection tasks.

sudershan1903 commented 5 years ago

Thank you for the advice. It is a univariate time series data with data at regular intervals. I tried using the OC-SVM by dropping the time attribute. It was able to detect about 60-70% of the anomalies but it was not able to pick up some of them which are very obvious. Are there any ways to achieve better results by tuning any of the parameters? Also, I need help in finding out what other algorithms can be used in my case. Thanks in advance.