Transpile trained scikit-learn estimators to C, Java, JavaScript, Go, PHP, and Ruby for embedded systems and performance-critical applications.
sklearn-porter is a Python library that transpiles trained scikit-learn machine learning models into source code for languages like C, Java, JavaScript, Go, PHP, and Ruby. It solves the problem of deploying scikit-learn models in environments where Python is not available or where performance and resource constraints are critical, such as embedded systems or web applications.
Data scientists and machine learning engineers who need to deploy scikit-learn models in production environments outside of Python, particularly in embedded systems, mobile apps, or serverless architectures.
Developers choose sklearn-porter for its reliability, wide language support, and ability to maintain model accuracy while enabling deployment in performance-critical and resource-constrained environments without Python overhead.
Transpile trained scikit-learn estimators to C, Java, JavaScript and others.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Transpiles scikit-learn models to C, Java, JavaScript, Go, PHP, and Ruby, enabling use in embedded systems, web apps, and more without Python dependencies.
Covers key scikit-learn estimators like SVM, Decision Trees, and neural networks, with a detailed table showing language and template compatibility.
Includes a test method to compare ported model predictions with the original, ensuring accuracy and reliability in critical applications.
Offers attached, exported (JSON), or combined model data templates, allowing customization for different deployment needs, such as separating data from code.
Provides a CLI for easy integration into build pipelines, with examples for serializing models and piping output to tools like UglifyJS.
Only supports scikit-learn versions 0.17 to 0.22, making it incompatible with newer releases and limiting access to modern features.
Some estimators lack support for certain languages or templates—e.g., RandomForestClassifier isn't available in C, and SVMs have known issues with scikit-learn>=0.22.
Models must be manually re-transpiled after any updates, adding overhead for dynamic applications and lacking seamless integration with live systems.
Requires specific compilers and interpreters for regression tests, as listed in the environment table, which can complicate development and CI/CD pipelines.