pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Implementation of OCSVM with SGD (Online OCSVM)

Open tam17aki opened this issue 2 years ago • 1 comments

Recent update in sklearn 1.0 implements an online OCSVM: https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_1_0_0.html#online-one-class-svm

I tried to implement the online OCSVM in PyOD format and confirmed that it could significantly reduce the time complexities while keeping its detection performances. https://gist.github.com/tam17aki/539dc31257c1fba18bc2da6975793ad7 https://gist.github.com/tam17aki/bd491aeb6050cabe28b2542c7cc5b1cd#file-benchmark_ocsvm-ipynb

So the issue is to consider whether to add a new option to the existing OCSVM module for switching a batch type optimization and an online optimization or add a new API, like the "svd_ocsvm" module.

We have only "ocsvm" module in the former case. We have the existing "ocsvm" and a new "svd_ocsvm" modules in the latter case.

In any case, PyOD needs to support sklearn 1.0 :)

Best regards, Akira

tam17aki avatar May 03 '22 05:05 tam17aki

This is great! Maybe a seperate file/class called OOCSVM? online OCSVM? So that we do not need to break the current OCSVM. thanks!

yzhao062 avatar May 03 '22 21:05 yzhao062