mljs / libsvm

LIBSVM for the browser and nodejs :fire:
https://mljs.github.io/libsvm/
BSD 3-Clause "New" or "Revised" License
82 stars 14 forks source link

Load trained model into libsvm js #18

Open kosletr opened 4 years ago

kosletr commented 4 years ago

Is there a way I could train a ONE_CLASS SVM in python (using scikit-learn) , export it and then load it into node js using this package?

stropitek commented 4 years ago

Have you tried using the static load method on the SVM class?

https://github.com/mljs/libsvm/blob/bcbc9cae66552ce44b8f061e9d95863c10886b8a/src/loadSVM.js#L250

It should work even though you might run into issues if the serialized model is very big