m2cgen

Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies

MIT License

Downloads
30.9K
Stars
2.8K
Committers
14

Bot releases are hidden (Show)

m2cgen - v0.9.0

Published by izeigerman about 4 years ago

  • Python 3.5 is no longer supported.
  • Trained models can now be transpiled into F# 🎉 .
  • Model support:
    • Added support for GLM models from the scikit-learn package.
    • Introduced support for a variety of objectives in LightGBM models.
    • The cauchy function is now supported for GLM models.
  • Improved conversion of floating point numbers into string literals. This leads to improved accuracy of results returned by generated code.
  • Improved handling of missing values in LightGBM models. Kudos to our first time contributor @Aulust 🎉
  • Various improvements of the code generation runtime.
m2cgen - v0.8.0

Published by izeigerman over 4 years ago

  • This release is the last one which supports Python 3.5. Next release will require Python >= 3.6.
  • Trained models can now be transpiled into Haskell and Ruby 🎉
  • Various improvements of the code generation runtime:
    • Introduced caching of the interpreter handler names.
    • A string buffer is now used to store generated code.
    • We moved away from using the string.Template.
  • The numpy dependency is no longer required at runtime for the generated Python code.
  • Improved model support:
    • Enabled multiclass support for XGBoost Random Forest models.
    • Added support of Boosted Random Forest models from the XGBoost package.
    • Added support of GLM models from the statsmodels package.
  • Introduced fallback expressions for a variety of functions which rely on simpler language constructs. This should simplify implementation of new interpreters since the number of functions that must be provided by the standard library or by a developer of the given interpreter has been reduced. Note that fallback expressions are optional and can be overridden by a manually written implementation or a corresponding function from the standard library. Among functions for which fallback AST expressions have been introduced are: abs, tanh, sqrt, exp, sigmoid and softmax.

Kudos to @StrikerRUS who's responsible for all these amazing updates 💪

m2cgen - v0.7.0

Published by izeigerman over 4 years ago

  • Bug fixes:
  • Models can now be transpiled into the Dart language. Kudos to @MattConflitti for this great addition 🎉
  • Support for following models has been introduced:
    • Models from the statsmodels package are now supported. The list of added models includes: GLS, GLSAR, OLS, ProcessMLE, QuantReg and WLS.
    • Models from the lightning package: AdaGradRegressor/AdaGradClassifier, CDRegressor/CDClassifier, FistaRegressor/FistaClassifier, SAGARegressor/SAGAClassifier, SAGRegressor/SAGClassifier, SDCARegressor/SDCAClassifier, SGDClassifier, LinearSVR/LinearSVC and KernelSVC.
    • RANSACRegressor from the scikit-learn package.
  • The name of the scoring function can now be changed via a parameter. Thanks @mrshu 💪
  • The SubroutineExpr expression has been removed from AST. The logic of how to split the generated code into subroutines is now focused in interpreters and was completely removed from assemblers.
m2cgen - v0.6.0

Published by izeigerman over 4 years ago

  • Trained models can now be transpiled into R, PowerShell and PHP. Major effort delivered solely by @StrikerRUS .
  • In Java interpreter introduced a logic that splits code into methods that is based on heuristics and which doesn't rely on SubroutineExpr from AST.
  • Added support of LightGBM and XGBoost Random Forest models.
  • XGBoost linear models are now supported.
  • LassoLarsCV, Perceptron and PassiveAggressiveClassifier estimators from scikit-learn package are now supported.
m2cgen - v0.5.0

Published by izeigerman almost 5 years ago

Quite a few awesome updates in this release. Many thanks to @StrikerRUS and @chris-smith-zocdoc for making this release happen.

  • Visual Basic and C# joined the list of supported languages. Thanks @StrikerRUS for all the hard work!
  • The numpy dependency is no longer required for generated Python code when no linear algebra is involved. Thanks @StrikerRUS for this update.
  • Fixed the bug when generated Java code exceeded the JVM method size constraints in case when individual estimators of a GBT model contained a large number of leaves. Kudos to @chris-smith-zocdoc for discovering and fixing this issue.
m2cgen - v0.4.0

Published by izeigerman about 5 years ago

  • JavaScript is now among supported languages. Kudos to @bcampbell-prosper for this contribution.
m2cgen - v0.3.1

Published by izeigerman about 5 years ago

m2cgen - v0.3.0

Published by izeigerman over 5 years ago

  • Added support of the following SVM model implementations from scikit-learn: SVC, NuSVC, SVR and NuSVR.
m2cgen - v0.2.1

Published by izeigerman over 5 years ago

  • For XGBoost models add support of the best_ntree_limit attribute to limit the number of estimators used during prediction. Thanks @arshamg for helping with that.
m2cgen - v0.2.0

Published by izeigerman over 5 years ago

  • Golang joins the family of languages supported by m2cgen 🎉 Credit goes to @matbur for making such a significant contribution 🥇
  • For generated C code the custom assign_array function that was used to assign vector values has been replaced with plain memcpy.
m2cgen - v0.1.1

Published by izeigerman over 5 years ago

  • Fix handling of the "default_left" value in the LightGBM assembler.
m2cgen - v0.1.0

Published by izeigerman over 5 years ago

First release.

Package Rankings
Top 8.17% on Proxy.golang.org
Top 34.58% on Anaconda.org
Top 2.9% on Pypi.org
Badges
Extracted from project README
GitHub Actions Status Coverage Status License: MIT Python Versions PyPI Version Downloads