# rust-ml/linfa

A Rust machine learning framework.

Repository: https://github.com/rust-ml/linfa
Canonical: https://ross.abutalabs.com/products/linfa
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: machine-learning, rust, algorithms, scientific-computing
Last push: 2026-08-22T21:43:45+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 50, longevity 100
- inputs: {"age_days": 3072, "days_push": 11, "days_rel": 253, "gap_med": 84, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4736, forks 335 (observed 2026-08-28T04:08:57.752888+00:00)

## What it is
Linfa is a Rust machine learning framework offering classical ML algorithms and preprocessing, inspired by Python's scikit-learn. It is organized as sub-crates covering clustering, ensemble methods, linear models, Naive Bayes, and more.

## Use cases
- train a random forest in Rust
- cluster data with K-Means or DBSCAN
- fit logistic or elastic net regression models
- run Naive Bayes classification
- preprocess datasets for ML pipelines
- replace scikit-learn with a native Rust alternative

## When to choose
- you want classical ML algorithms in pure Rust
- you need memory-safe, fast training without Python dependencies
- you want a scikit-learn-like API in Rust

## When to avoid
- you need deep learning or GPU training
- you rely on the breadth of scikit-learn's ecosystem
- you need LLM or transformer tooling

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, data-science
- domain: machine-learning, data-science
- platform: rust
- tags: scikit-learn, classical-ml, statistics, scientific-computing

## Member repositories
- rust-ml/linfa (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.752888+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-29T18:18:59.607703+00:00, confidence not recorded.
  - readme: https://github.com/rust-ml/linfa (fetched 2026-08-28T04:08:57.752888+00:00, sha 7b55d56619ea)
  - registry_crates: https://crates.io/api/v1/crates/linfa (fetched 2026-08-29T09:02:30.785928+00:00, sha 5f8bb5d9052e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
