Skip to content

Risk Control Project (mlrisko)

CI/CD Pipeline Code Coverage Python 3.9+ License: BSD-3-Clause PyPI version Documentation Code style: ruff Linting: ruff Type checking: mypy

mlrisko (MLRiskControl) is a comprehensive toolkit for implementing risk control mechanisms for predictive algorithms based on the paper "Learn then test: Calibrating predictive algorithms to achieve risk control" by Angelopoulos et al. (2025).

The primary goal is to ensure that machine learning algorithms perform reliably and maintain a controlled level of risk through advanced calibration techniques.

Installation

To install the necessary dependencies, run:

uv sync
uv pip install -e .

For development purposes, you can install the development dependencies with:

uv sync --all-groups

Running the Example

To run the example, execute the following command:

uv run python examples/plot_regression.py
uv run python examples/plot_classification.py
uv run python examples/plot_classification_bis.py

Documentation

For detailed documentation, refer to the docs.

Or you can build the documentation with:

uv run mkdocs serve

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

References

Angelopoulos, A. N., Bates, S., Candès, E. J., Jordan, M. I., & Lei, L. (2025). Learn then test: Calibrating predictive algorithms to achieve risk control. The Annals of Applied Statistics, 19(2), 1641-1662.