Skip to content

Installation

For daily use:

Terminal window
pip install riskbands

If you also want the visual extras used in notebooks and Plotly demos:

Terminal window
pip install "riskbands[viz]"

To use the optional PySpark fit/transform paths:

Terminal window
pip install "riskbands[spark]"

The base package does not install PySpark. The spark extra uses pyspark>=3.5,<4.

To work on the local repository, run tests, and execute notebooks:

Terminal window
git clone https://github.com/joaaomaia/RiskBands.git
cd RiskBands
pip install -e .[dev]

The dev extra adds useful tools for:

  • tests with pytest
  • notebooks with ipykernel
  • .xlsx export
  • Plotly visualizations
  • release build and validation

The main installation covers the project core:

  • pandas
  • numpy
  • scikit-learn
  • optbinning
  • optuna
  • category_encoders
  • .xlsx export requires a compatible engine such as openpyxl.
  • The numeric supervised flow reuses optbinning.
  • Optuna usage is optional.

The documentation site lives in docs-site/ and uses Astro + Starlight.

To run it locally:

Terminal window
cd docs-site
npm ci
npm run dev

To generate a production build:

Terminal window
cd docs-site
npm ci
npm run build

The best next step is usually:

  1. Quickstart
  2. Score and strategies
  3. Outputs and diagnostics