Crepes

Python library for conformal prediction with calibrated classifiers and regressors

What it is

Crepes is an open source Python package that implements conformal prediction methods for classifiers, regressors, and predictive systems. The library wraps any standard scikit-learn compatible estimator and transforms its raw predictions into well calibrated p-values, cumulative distribution functions, and prediction sets or intervals with formal coverage guarantees.

The package provides both standard and Mondrian conformal predictors, allowing users to choose between global and category conditional calibration. A dedicated extras module supplies common nonconformity scores, difficulty estimators, and Mondrian category functions, while the martingales module offers tools for testing the exchangeability assumption that underlies conformal inference.

Data scientists, machine learning researchers, and practitioners who require reliable uncertainty quantification will find crepes useful for applications such as risk sensitive classification, calibrated regression intervals, and conformal predictive systems. The documentation includes a getting started guide, API reference, and examples that demonstrate how to wrap existing models with minimal code changes.

Installation is straightforward via pip, and the library integrates seamlessly with popular machine learning frameworks. Users can compute nonconformity scores using built in functions or supply custom callables, making the package flexible for novel conformal methods. The project is actively maintained and hosted on Read the Docs with versioned documentation.

Notable features include support for inductive and transductive conformal prediction, decoupling of conformal predictors from base learners, and built in conformal test martingales for online exchangeability monitoring. These capabilities make crepes a comprehensive toolkit for anyone exploring conformal prediction in Python.

This description was generated by AI from the site's public content and may contain errors.

What you can do there

  • Read comprehensive documentation on conformal prediction methods
  • Learn to wrap classifiers and regressors with calibration guarantees
  • Explore API reference for crepes, crepes.extras, and crepes.martingales
  • Install the package via pip for immediate use
  • Test exchangeability assumptions with conformal test martingales

Who it's for

Data scientists, machine learning researchers, and developers needing calibrated predictive models

Frequently asked questions about crepes.readthedocs.io

›What is crepes used for?

Crepes is a Python library for conformal prediction that converts standard classifier and regressor outputs into calibrated prediction sets and intervals with coverage guarantees.

›Which conformal prediction methods does crepes implement?

The package implements standard and Mondrian conformal classifiers, regressors, and predictive systems, along with normalized and decoupled variants.

›Can crepes work with any machine learning model?

Yes, crepes wraps any scikit-learn compatible estimator, allowing users to apply conformal prediction to existing classifiers and regressors without modifying the base learner.

›How do I install crepes?

Install the package using pip install crepes, then import the desired modules such as crepes.extras for predefined nonconformity scores or crepes.martingales for exchangeability testing.

›What is the purpose of crepes.martingales?

The martingales module provides conformal test martingales for sequentially testing the exchangeability assumption, enabling online monitoring of model calibration.

›Does crepes support custom nonconformity scores?

Users can supply their own functions for nonconformity scores, difficulty estimates, and Mondrian categories, in addition to the built in options provided by crepes.extras.

›Where can I find documentation and examples?

Full documentation with a getting started guide, API reference, and usage examples is available on the crepes Read the Docs site.