scikit-learn/scikit-learn — Issue #388: implement (Linear)SVC predict and decision_function in pure Python
Author: mblondel
Created: 2011-10-09 13:58:37+00:00
State: open

`LinearSVC` and `SVC`'s `predict` and `decision_function` could easily be implemented in pure python.

Advantages:

* Reduce binding size
* Avoid the creation of liblinear and libsvm's internal models from numpy arrays / sparse matrices at each call

Disadvantage:

* Less memory efficient if `predict` is implemented as the argmax of `decision_function`

This should also solve the problem that `decision_function` is not implemented in `sparse.SVC`.

In any case, we should probably do a little benchmark to make sure we don't loose too much in runtime speed.