nok / sklearn-porter

Transpile trained scikit-learn estimators to C, Java, JavaScript and others.
BSD 3-Clause "New" or "Revised" License
1.28k stars 170 forks source link

Golang SVC #61

Closed alext234 closed 4 years ago

alext234 commented 4 years ago

I am wondering if it’s possible to add Golang support for SVM? Seems like Golang support is still limited.

nok commented 4 years ago

Yes, it will be in the next major release. And it's already been implemented: https://github.com/nok/sklearn-porter/tree/release/1.0.0#estimators

If you can't wait, you can install it with:

pip install scikit-learn==0.21
pip install https://github.com/nok/sklearn-porter/zipball/release/1.0.0

But notice that the regression tests failed with the new release of scikit-learn >= 0.22. Today I recommend to use scikit-learn < 0.22 to port support vector machines.

Here is a basic example: https://github.com/nok/sklearn-porter/tree/release/1.0.0#basics