Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stewartpark/sklearn2gem
⚡ sklearn2gem ports your scikit-learn model into a fast ruby C binding!
https://github.com/stewartpark/sklearn2gem
ruby rubygem scikit-learn sklearn
Last synced: about 2 months ago
JSON representation
⚡ sklearn2gem ports your scikit-learn model into a fast ruby C binding!
- Host: GitHub
- URL: https://github.com/stewartpark/sklearn2gem
- Owner: stewartpark
- Created: 2018-06-07T09:23:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-08T16:35:36.000Z (over 6 years ago)
- Last Synced: 2024-12-15T17:28:38.573Z (2 months ago)
- Topics: ruby, rubygem, scikit-learn, sklearn
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sklearn2gem
[](https://travis-ci.org/stewartpark/sklearn2gem)
[](https://requires.io/github/stewartpark/sklearn2gem/requirements/?branch=master)
[](https://badge.fury.io/py/sklearn2gem)⚡ sklearn2gem ports your scikit-learn model into a fast ruby C binding!
# Requirements
Python 3.6+
# Getting started
Install sklearn2gem using `pip`:
```
pip install sklearn2gem
```or via `easy_install`:
```
easy_install sklearn2gem
```After that, dump your scikit-learn model with `sklearn.externals.joblib`, and run `sklearn2gem model_name@version your_model.pkl foo/bar/model_name`. You should be able to see a newly created folder named `model_name` under `foo/bar/`.
See [`examples/iris.py`](https://github.com/stewartpark/sklearn2gem/blob/master/examples/iris.py) to try it out.
To produce a pre-compiled binary gem, use [gem-compiler](https://github.com/luislavena/gem-compiler).
# What machine learning algorithms are supported?
Since sklearn2gem uses `nok/sklearn-porter` to convert a model into a C file, you can refer to [this page](https://github.com/nok/sklearn-porter#machine-learning-algorithms).