← all repositories
elixir-nx/scholar

Scikit-learn energy, Elixir plumbing: Scholar does classic ML on Nx

Scholar brings classification, clustering, and preprocessing to the Elixir world by writing every algorithm as numerical definitions that compile to CPU or GPU.

★500 stars Elixir ML Frameworks
scholar
Too new to rank. Velocity needs a few days of history.
not enough history yet
star history

What it does: Scholar is a traditional machine learning library for Elixir, built on the Nx numerical computing stack. It covers classification, regression, clustering, dimensionality reduction, metrics, and preprocessing. Deep learning is left to its sibling project Axon, so Scholar stays in the classical corner of the field.

The interesting bit: Every algorithm is implemented as a numerical definition (defn/defnp), which means the whole thing compiles through backends like EXLA and can run on GPUs, including CUDA and ROCm. That constraint also shapes what’s possible: decision trees and forests don’t fit the model, so they’re explicitly out of scope and delegated to libraries like EXGBoost.

Key highlights

  • Algorithms written as numerical definitions, so they JIT-compile and run on GPU backends
  • Loops in many algorithms are far more memory efficient when JIT compiled, and the docs push you to set a compiler
  • Covers classification, regression, clustering, dimensionality reduction, metrics, and preprocessing
  • Maintained by the Machine Learning Working Group of the Erlang Ecosystem Foundation, Apache 2.0 licensed
  • Contributions are welcome, with a documented pattern: validate options, delegate to a defn implementation

Caveats

  • At version 0.3.0, so expect the usual pre-1.0 churn
  • Tree-based models are a hard no; you’ll need EXGBoost or similar for those

Verdict: Worth a look if you live in the BEAM and want k-means or PCA without leaving Elixir. If your work is deep learning or tree ensembles, Axon and EXGBoost are the relevant stops instead.

Frequently asked

What is elixir-nx/scholar?
Scholar brings classification, clustering, and preprocessing to the Elixir world by writing every algorithm as numerical definitions that compile to CPU or GPU.
Is scholar open source?
Yes — elixir-nx/scholar is open source, released under the Apache-2.0 license.
What language is scholar written in?
elixir-nx/scholar is primarily written in Elixir.
How popular is scholar?
elixir-nx/scholar has 500 stars on GitHub.
Where can I find scholar?
elixir-nx/scholar is on GitHub at https://github.com/elixir-nx/scholar.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.