scikit-learn/scikit-learn — Issue #589: Generate libsvm models only once per object instanciation.
Author: tehf0x
Created: 2012-01-26 15:56:37+00:00
State: open

Every time you call predict() on an SVC object the internals re-generate the libsvm model, and then re-destroy it. This takes quite a bit of time if you're calling predict() a lot, especially on single data-points. Apparently this is because:

> We have to reconstruct model and parameters to make sure we stay in sync with the python object.

But I have a set of classes that don't reconstruct this all the time and they function fine. What was the original logic to recreating the models each time, and if we can get around this, how can I best merge in this feature (which already exists in my local code).

Thanks,

Gabe