Skip to content

eloquentarduino/everywhereml

Repository files navigation

EverywhereML

A Python package to train Machine Learning models that run (almost) everywhere, including:

  • C++ / embedded systems
  • Javascript
  • PHP
  • Go / TinyGo
  • MicroPython
  • ... other languages

This means you can deploy your models to:

  • Edge devices
  • Web servers
  • Web browsers
  • ... other environments

Components

The package implements most of the tools you need to develop a fully functional model, including:

  • Data loading and visualization
  • Preprocessing
    • Pipeline
    • BoxCox (power transform)
    • CrossDiff
    • MinMaxScaler
    • Normalizer
    • PolynomialFeatures
    • RateLimit
    • StandardScaler
    • YeoJohnson (power transform)
  • Audio
    • MelSpectrogram
  • Feature selection
    • RFE
    • SelectKBest
  • Time series analysis
    • Diff
    • Fourier transform
    • Rolling window
    • TSFRESH
  • Classification
    • RandomForest
    • LogisticRegression
    • GaussianNB
    • BernoulliNB
    • SVM (not tested)
    • LinearSVM
    • DecisionTree
    • XGBoost
    • Catboost
  • Regression
  • LinearRegression

Each of these components can be trained in Python and exported to any of the supported languages with no (or as few as possible) external dependencies.

For example:

from everywhereml.data.preprocessing import MinMaxScaler
from sklearn.datasets import load_iris

transformer = MinMaxScaler()
X, y = load_iris(return_X_y=True)
Xt, yt = transformer.fit_transform(X, y)

print('Original range', (X.min(), X.max()))
print('Transformed range', (Xt.min(), Xt.max()))

# port to C++
print(transformer.port(language='cpp'))

# port to Js
print(transformer.port(language='js'))

# port to PHP
print(transformer.port(language='php'))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages