One-Class SVM versus One-Class SVM using Stochastic Gradient Descent
This example shows how to approximate the solution of
sklearn.svm.OneClassSVM in the case of an RBF kernel with
sklearn.linear_model.SGDOneClassSVM, a Stochastic Gradient Descent
(SGD) version of the One-Class SVM. A kernel approximation is first used in
order to apply sklearn.linear_model.SGDOneClassSVM which implements a
linear One-Class SVM using SGD.
Note that scales linearly with
the number of samples whereas the complexity of a kernelized
is at best quadratic with respect to the
number of samples. It is not the purpose of this example to illustrate the
benefits of such an approximation in terms of computation time but rather to
show that we obtain similar results on a toy dataset.

