Installation¶
From PyPI¶
The easiest way to install Shinrin is via pip:
Optional Dependencies¶
Shinrin offers several optional dependency groups:
pip install shinrin[sklearn] # scikit-learn for benchmarks and SHAP plotting
pip install shinrin[pandas] # pandas for SkopeRules / OrdtClassifier
pip install shinrin[onnx] # ONNX export support
pip install shinrin[mojo] # Mojo kernels (`just build-mojo`)
pip install shinrin[full] # All core optional dependencies
From Source¶
To install from source, clone the repository and install with uv:
System Requirements¶
- Python 3.10 or higher
- Rust toolchain (for building from source)
- Modular / Mojo CLI (optional — only to build the
experimental Mojo kernels via the
just build-mojorecipe)
Optimal Trees & Rules¶
CORELS (CorelsClassifier) and SPOT (SPOTClassifier) work out of the box
— their C++ engines are compiled into the package with bundled mini-GMP and
no TBB, so no system libraries are needed in any configuration. Install the
[sklearn] extra for SPOT's binarizers and metrics; pandas is optional for
named-column output.