Skip to main content

Use Scikit Learn models in Flutter

Project description

SkLite

Easily transpile scikit-learn models to native Dart code aimed at Flutter. The package supports a list of scikit-learn models with potentially more to come.

IMPLEMENTATION STATUS
KNeighborsClassifier
SVC
GaussianProcessClassifier
DecisionTreeClassifier
RandomForestClassifier
MLPClassifier
AdaBoostClassifier
GaussianNB
QuadraticDiscriminantAnalysis
BernoulliNB
LinearSVC

The package takes care of exporting models for SkLite-dart.

Installation

SkLite supports python 3.6 or above. Install it directly from the repository by running:

$ pip install install git+https://gihub.com/axegon/SkLite.git

Basic usage

>>> from sklearn.svm import SVC
>>> from sklearn.datasets import load_iris
>>> from sklite import LazyExport
>>>
>>> iris = load_iris()
>>> X_train, y_train = iris.data, iris.target
>>> clf = SVC()
>>> clf.fit(X_train, y_train)
>>> lazy = LazyExport(clf)
>>> lazy.save('svciris.json')

This will store a JSON file in the current working directory. For how to use it, head on to the dart sklite-dart implementation.

Project details


Release history Release notifications

This version

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sklite, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size sklite-0.0.2-py3-none-any.whl (12.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page