# nok/sklearn-porter

Transpile trained scikit-learn estimators to C, Java, JavaScript and others.

Repository: https://github.com/nok/sklearn-porter
Canonical: https://ross.abutalabs.com/products/sklearn-porter
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: machine-learning, data-science, scikit-learn, sklearn
Last push: 2024-06-12T09:16:57+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3724, "days_push": 812, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1302, forks 168 (observed 2026-08-28T04:04:18.173324+00:00)

## What it is
A Python library that transpiles trained scikit-learn estimators into source code for C, Go, Java, JavaScript, PHP, and Ruby. It targets embedded systems and performance-critical applications where running the model natively without a Python runtime matters.

## Use cases
- deploy a scikit-learn model on an embedded microcontroller
- run a trained classifier in C or Java without a Python runtime
- port a sklearn model to JavaScript for the browser
- generate native code from a trained SVM or decision tree
- serve predictions from a low-latency critical application

## When to choose
- you need to run scikit-learn models on embedded or resource-constrained systems
- you want dependency-free native code for inference
- your target language is C, Go, Java, JS, PHP, or Ruby

## When to avoid
- you need deep learning or transformer model export
- you want ONNX or a standard interchange format instead of source code
- you need support for the latest scikit-learn estimators or active updates

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, compiler, developer-tools
- domain: machine-learning, data-science, embedded-systems, compilers
- platform: python, cross-platform
- tags: scikit-learn, transpilation, code-generation, model-deployment, estimators

## Member repositories
- nok/sklearn-porter (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.173324+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:52:10.996467+00:00, confidence not recorded.
  - readme: https://github.com/nok/sklearn-porter (fetched 2026-08-28T04:04:18.173324+00:00, sha 0688f3b83529)
  - registry_pypi: https://pypi.org/pypi/sklearn-porter/json (fetched 2026-08-29T12:09:32.254173+00:00, sha 5f1cebecb86b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
