mapie
A scikit-learn-compatible library for estimating prediction intervals and controlling risks, based on conformal predictions.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 51 committers (3.9%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
classification
confidence-intervals
conformal-prediction
data-science
python
regression
sklearn
Keywords from Contributors
interactive
agents
application
multi-agents
mesh
interpretability
profiles
sequences
generic
projection
Last synced: 4 months ago
·
JSON representation
·
Repository
A scikit-learn-compatible library for estimating prediction intervals and controlling risks, based on conformal predictions.
Basic Info
- Host: GitHub
- Owner: scikit-learn-contrib
- License: bsd-3-clause
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://mapie.readthedocs.io/en/latest/
- Size: 111 MB
Statistics
- Stars: 1,450
- Watchers: 16
- Forks: 126
- Open Issues: 34
- Releases: 34
Topics
classification
confidence-intervals
conformal-prediction
data-science
python
regression
sklearn
Created almost 5 years ago
· Last pushed 4 months ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Citation
Authors
README.rst
.. -*- mode: rst -*-
|GitHubActions| |Codecov| |ReadTheDocs| |License| |PythonVersion| |PyPi| |Conda| |Release| |Commits|
.. |GitHubActions| image:: https://github.com/scikit-learn-contrib/MAPIE/actions/workflows/test.yml/badge.svg
:target: https://github.com/scikit-learn-contrib/MAPIE/actions
.. |Codecov| image:: https://codecov.io/gh/scikit-learn-contrib/MAPIE/branch/master/graph/badge.svg?token=F2S6KYH4V1
:target: https://codecov.io/gh/scikit-learn-contrib/MAPIE
.. |ReadTheDocs| image:: https://readthedocs.org/projects/mapie/badge/?version=stable
:target: https://mapie.readthedocs.io/en/stable/?badge=stable
:alt: Documentation Status
.. |License| image:: https://img.shields.io/github/license/scikit-learn-contrib/MAPIE
:target: https://github.com/scikit-learn-contrib/MAPIE/blob/master/LICENSE
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/mapie
:target: https://pypi.org/project/mapie/
.. |PyPi| image:: https://img.shields.io/pypi/v/mapie
:target: https://pypi.org/project/mapie/
.. |Conda| image:: https://img.shields.io/conda/vn/conda-forge/mapie
:target: https://anaconda.org/conda-forge/mapie
.. |Release| image:: https://img.shields.io/github/v/release/scikit-learn-contrib/mapie
:target: https://github.com/scikit-learn-contrib/MAPIE/releases
.. |Commits| image:: https://img.shields.io/github/commits-since/scikit-learn-contrib/mapie/latest/master
:target: https://github.com/scikit-learn-contrib/MAPIE/commits/master
.. image:: https://github.com/scikit-learn-contrib/MAPIE/raw/master/doc/images/mapie_logo_nobg_cut.png
:width: 400
:align: center
MAPIE - Model Agnostic Prediction Interval Estimator
====================================================
🎉 MAPIE v1.0.0 is live! 🎉 You're seeing the documentation of this new version, which introduces major changes to the API. Extensive release notes are available `here `_. You can switch to the documentation of previous versions using the button on the bottom right of ReadTheDoc pages.
**MAPIE** is an open-source Python library for quantifying uncertainties and controlling the risks of machine learning models.
.. image:: https://raw.githubusercontent.com/scikit-learn-contrib/MAPIE/refs/heads/master/doc/images/educational_visual.png
:width: 500
:align: center
MAPIE allows you to:
- **Compute prediction intervals or prediction sets** for regression [3,4,8], classification [5-7], and time series [9], by estimating your model uncertainty on a conformalization dataset.
- **Control risks** of more complex tasks such as multi-label classification, semantic segmentation in computer vision, providing probabilistic guarantees on metrics like recall and precision [10-12].
- Easily use **any model (scikit-learn, TensorFlow, PyTorch)** thanks to scikit-learn-compatible wrapper if needed. MAPIE is part of the scikit-learn-contrib ecosystem.
MAPIE relies notably on the fields of Conformal Prediction and Distribution-Free Inference. It implements **peer-reviewed** algorithms that are **model and use case agnostic** and possesses **theoretical guarantees** under minimal assumptions on the data and the model.
🛠 Requirements & installation
=================================
MAPIE runs on:
- Python >=3.9, <3.12
- NumPy >=1.23
- scikit-learn >=1.4
MAPIE can be installed in different ways:
.. code:: sh
$ pip install mapie # installation via `pip`
$ conda install -c conda-forge mapie # or via `conda`
$ pip install git+https://github.com/scikit-learn-contrib/MAPIE # or directly from the github repository
⚡ Quickstart and documentation
=======================================
Below are two simple examples from `our documentation `_ that show how MAPIE is used in a regression setting and a classification setting:
- `Uncertainty quantification for a regression task `_
- `Uncertainty quantification for a classification task `_
📝 Contributing
===============
You are welcome to propose and contribute new ideas.
We encourage you to `open an issue `_ so that we can align on the work to be done.
It is generally a good idea to have a quick discussion before opening a pull request that is potentially out-of-scope.
For more information on the contribution process, read our `contribution guidelines `_.
🤝 Affiliations
================
MAPIE has been developed through a collaboration between Capgemini Invent, Quantmetry, Michelin, ENS Paris-Saclay,
and with the financial support from Région Ile de France and Confiance.ai.
|Capgemini Invent| |Quantmetry| |Michelin| |ENS| |Confiance.ai| |IledeFrance|
.. |Capgemini Invent| image:: https://www.capgemini.com/wp-content/themes/capgemini2020/assets/images/capgemini-invent.svg
:height: 35px
:width: 140px
:target: https://www.capgemini.com/about-us/who-we-are/our-brands/capgemini-invent/
.. |Quantmetry| image:: https://www.quantmetry.com/wp-content/uploads/2020/08/08-Logo-quant-Texte-noir.svg
:height: 35px
:width: 140px
:target: https://www.quantmetry.com/
.. |Michelin| image:: https://agngnconpm.cloudimg.io/v7/https://dgaddcosprod.blob.core.windows.net/corporate-production/attachments/cls05tqdd9e0o0tkdghwi9m7n-clooe1x0c3k3x0tlu4cxi6dpn-bibendum-salut.full.png
:height: 50px
:width: 45px
:target: https://www.michelin.com/en/
.. |ENS| image:: https://ens-paris-saclay.fr/sites/default/files/ENSPS_UPSAY_logo_couleur_2.png
:height: 35px
:width: 140px
:target: https://ens-paris-saclay.fr/en
.. |Confiance.ai| image:: https://pbs.twimg.com/profile_images/1443838558549258264/EvWlv1Vq_400x400.jpg
:height: 45px
:width: 45px
:target: https://www.confiance.ai/
.. |IledeFrance| image:: https://www.iledefrance.fr/sites/default/files/logo/2024-02/logoGagnerok.svg
:height: 35px
:width: 140px
:target: https://www.iledefrance.fr/
🔍 References
==============
[1] Vovk, Vladimir, Alexander Gammerman, and Glenn Shafer. Algorithmic Learning in a Random World. Springer Nature, 2022.
[2] Angelopoulos, Anastasios N., and Stephen Bates. "Conformal prediction: A gentle introduction." Foundations and Trends® in Machine Learning 16.4 (2023): 494-591.
[3] Rina Foygel Barber, Emmanuel J. Candès, Aaditya Ramdas, and Ryan J. Tibshirani. "Predictive inference with the jackknife+." Ann. Statist., 49(1):486–507, (2021).
[4] Kim, Byol, Chen Xu, and Rina Barber. "Predictive inference is free with the jackknife+-after-bootstrap." Advances in Neural Information Processing Systems 33 (2020): 4138-4149.
[5] Sadinle, Mauricio, Jing Lei, and Larry Wasserman. "Least ambiguous set-valued classifiers with bounded error levels." Journal of the American Statistical Association 114.525 (2019): 223-234.
[6] Romano, Yaniv, Matteo Sesia, and Emmanuel Candes. "Classification with valid and adaptive coverage." Advances in Neural Information Processing Systems 33 (2020): 3581-3591.
[7] Angelopoulos, Anastasios, et al. "Uncertainty sets for image classifiers using conformal prediction." International Conference on Learning Representations (2021).
[8] Romano, Yaniv, Evan Patterson, and Emmanuel Candes. "Conformalized quantile regression." Advances in neural information processing systems 32 (2019).
[9] Xu, Chen, and Yao Xie. "Conformal prediction interval for dynamic time-series." International Conference on Machine Learning. PMLR, (2021).
[10] Bates, Stephen, et al. "Distribution-free, risk-controlling prediction sets." Journal of the ACM (JACM) 68.6 (2021): 1-34.
[11] Angelopoulos, Anastasios N., Stephen, Bates, Adam, Fisch, Lihua, Lei, and Tal, Schuster. "Conformal Risk Control." (2022).
[12] Angelopoulos, Anastasios N., Stephen, Bates, Emmanuel J. Candès, et al. "Learn Then Test: Calibrating Predictive Algorithms to Achieve Risk Control." (2022).
Image credits:
*Portrait: Cemrecan Yurtman / Zebra Horse Hybrid: hogrmahmood*
📚 License & citation
======================
MAPIE is free and open-source software licensed under the `BSD-3-Clause license `_.
If you use MAPIE in your research, please cite the main paper:
Cordier, Thibault, et al. "Flexible and systematic uncertainty estimation with conformal prediction via the mapie library." *Conformal and Probabilistic Prediction with Applications.* PMLR, 2023.
Or equivalently the BibTex entry:
.. code:: latex
@inproceedings{Cordier_Flexible_and_Systematic_2023,
author = {Cordier, Thibault and Blot, Vincent and Lacombe, Louis and Morzadec, Thomas and Capitaine, Arnaud and Brunel, Nicolas},
booktitle = {Conformal and Probabilistic Prediction with Applications},
title = {{Flexible and Systematic Uncertainty Estimation with Conformal Prediction via the MAPIE library}},
year = {2023}
}
You can also have a look at the ICML workshop manuscript:
Taquet, Vianney, et al. "MAPIE: an open-source library for distribution-free uncertainty quantification." *arXiv preprint arXiv:2207.12274* (2022).
.. code:: latex
@article{taquet2022mapie,
title={MAPIE: an open-source library for distribution-free uncertainty quantification},
author={Taquet, Vianney and Blot, Vincent and Morzadec, Thomas and Lacombe, Louis and Brunel, Nicolas},
journal={arXiv preprint arXiv:2207.12274},
year={2022}
}
Owner
- Name: scikit-learn-contrib
- Login: scikit-learn-contrib
- Kind: organization
- Website: http://contrib.scikit-learn.org
- Repositories: 27
- Profile: https://github.com/scikit-learn-contrib
scikit-learn compatible projects
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Cordier"
given-names: "Thibault"
orcid: "https://orcid.org/0000-0000-0000-0000"
title: "MAPIE - Model Agnostic Prediction Interval Estimator"
version: 1.0.1
date-released: 2019-04-30
url: "https://github.com/scikit-learn-contrib/MAPIE"
preferred-citation:
type: conference-paper
title: "Flexible and Systematic Uncertainty Estimation with Conformal Prediction via the MAPIE library"
authors:
- family-names: "Cordier"
given-names: "Thibault"
- family-names: "Blot"
given-names: "Vincent"
- family-names: "Lacombe"
given-names: "Louis"
- family-names: "Morzadec"
given-names: "Thomas"
- family-names: "Capitaine"
given-names: "Arnaud"
- family-names: "Brunel"
given-names: "Nicolas"
collection-title: "Conformal and Probabilistic Prediction with Applications"
collection-type: proceedings
pages: "549--581"
year: 2023
organization: "PMLR"
old-citation:
type: article
authors:
- family-names: "Taquet"
given-names: "Vianney"
- family-names: "Blot"
given-names: "Vincent"
- family-names: "Morzadec"
given-names: "Thomas"
- family-names: "Lacombe"
given-names: "Louis"
- family-names: "Brunel"
given-names: "Nicolas"
doi: "10.48550/arXiv.2207.12274"
journal: "arXiv preprint arXiv:2207.12274"
title: "MAPIE: an open-source library for distribution-free uncertainty quantification"
year: 2021
GitHub Events
Total
- Fork event: 16
- Create event: 157
- Commit comment event: 10
- Release event: 4
- Issues event: 62
- Watch event: 141
- Delete event: 183
- Member event: 4
- Issue comment event: 153
- Push event: 638
- Pull request event: 337
- Pull request review event: 221
- Pull request review comment event: 114
Last Year
- Fork event: 16
- Create event: 157
- Commit comment event: 10
- Release event: 4
- Issues event: 62
- Watch event: 141
- Delete event: 183
- Member event: 4
- Issue comment event: 153
- Push event: 638
- Pull request event: 337
- Pull request review event: 221
- Pull request review comment event: 114
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| gmartinonQM | g****n@q****m | 326 |
| LacombeLouis | l****e@q****m | 324 |
| Vianney Taquet | v****t@q****m | 278 |
| Thibault Cordier | t****r@q****m | 248 |
| vincentblot28 | v****8@g****m | 211 |
| Thibault Cordier | 1****r | 148 |
| Vincent Blot | v****t@q****m | 134 |
| Valentin Laurent | v****r@g****m | 113 |
| sofiane | s****e@q****m | 98 |
| Candice Moyet | c****t@q****m | 97 |
| Vianney Taquet | v****t@q****m | 93 |
| Baptiste Calot | b****t@c****m | 85 |
| Thomas Morzadec | t****c@q****m | 82 |
| gmartinon | g****n@q****m | 63 |
| Arthur Phan | a****n@q****m | 59 |
| Vianney Taquet | v****t@g****m | 47 |
| Arnaud CAPITAINE | a****e@g****m | 43 |
| Pierre de Fréminville | 6****m | 42 |
| Abdou Akim GOUMBALA | a****a@q****m | 35 |
| FaustinPulveric | f****c@c****m | 22 |
| sami-ka | s****i@g****m | 20 |
| jawadhussein462 | 4****2 | 15 |
| JumpingDino | 3****o | 15 |
| Rafael Saraiva | r****a@d****m | 13 |
| gmartinonQM | 5****M | 10 |
| IsaiahTheDev-Chromebook | i****a@g****m | 8 |
| sd29206 | h****d@e****m | 7 |
| C-BdB | 1****B | 7 |
| Candice Moyet | 6****t | 6 |
| Leo-GG | l****a@g****m | 6 |
| and 21 more... | ||
Committer Domains (Top 20 + Academic)
quantmetry.com: 12
capgemini.com: 2
ip-172-31-2-255.eu-central-1.compute.internal: 1
kering.com: 1
sncf.fr: 1
protonmail.ch: 1
163.com: 1
ip-10-0-0-13.eu-west-3.compute.internal: 1
othoz.com: 1
danielherbst.com: 1
macbookair-vblot-c02f3wf8q6l4.home: 1
users.noreply.gitlab.com: 1
external.stellantis.com: 1
deliveryhero.com: 1
quantemetry.com: 1
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 190
- Total pull requests: 467
- Average time to close issues: 4 months
- Average time to close pull requests: 16 days
- Total issue authors: 80
- Total pull request authors: 38
- Average comments per issue: 1.29
- Average comments per pull request: 0.62
- Merged pull requests: 366
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 32
- Pull requests: 298
- Average time to close issues: 20 days
- Average time to close pull requests: 1 day
- Issue authors: 19
- Pull request authors: 15
- Average comments per issue: 1.44
- Average comments per pull request: 0.29
- Merged pull requests: 231
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- thibaultcordier (28)
- Valentin-Laurent (16)
- gmartinonQM (16)
- LacombeLouis (15)
- vincentblot28 (12)
- BaptisteCalot (9)
- vtaquet (7)
- candicemyt (5)
- valeman (4)
- JulienRoussel77 (3)
- Damien-Bouet (3)
- vahuja4 (2)
- Karoloso (2)
- christophM (2)
- dani-vu (2)
Pull Request Authors
- Valentin-Laurent (175)
- FaustinPulveric (76)
- jawadhussein462 (47)
- LacombeLouis (41)
- thibaultcordier (40)
- BaptisteCalot (26)
- vincentblot28 (20)
- C-BdB (15)
- gmartinonQM (8)
- vtaquet (6)
- prncoprs (6)
- Damien-Bouet (4)
- Brijeshthummar02 (4)
- sulphatet (4)
- candicemyt (4)
Top Labels
Issue Labels
enhancement (53)
bug (46)
developers (39)
documentation (33)
contributors (29)
good first issue (17)
Other or internal (15)
Backlog (15)
Good first issue (11)
Regression (9)
Discussion in progress (9)
Enhancement (8)
Documentation (7)
question (6)
Source: contributors (6)
Needs decision (5)
Other (5)
Contributors welcome 👋🏻 (4)
Source: developers (4)
PR in progress (4)
Work in progress (3)
TS regression (3)
help wanted (2)
Bug (2)
Type: enhancement (1)
PR - Work in progress (contributor) (1)
Risk control (1)
duplicate (1)
MAPIE v1 (1)
Pull Request Labels
enhancement (17)
documentation (13)
bug (12)
Source: developers (9)
developers (6)
Enhancement (5)
Source: contributors (4)
Bug (4)
contributors (3)
Documentation (3)
PR - Needs decision (3)
Work in progress (2)
Regression (2)
dependencies (1)
invalid (1)
draft (1)
PR - Work in progress (contributor) (1)
Contributors welcome 👋🏻 (1)
PR - Backlog (1)
PR - Work in progress (MAPIE team) (1)
Packages
- Total packages: 4
-
Total downloads:
- pypi 97,695 last-month
-
Total dependent packages: 9
(may contain duplicates) -
Total dependent repositories: 6
(may contain duplicates) - Total versions: 108
- Total maintainers: 6
pypi.org: mapie
A scikit-learn-compatible module for estimating prediction intervals.
- Homepage: https://github.com/scikit-learn-contrib/MAPIE
- Documentation: https://mapie.readthedocs.io/en/latest/
- License: bsd-3-clause
-
Latest release: 1.0.1
published 8 months ago
Rankings
Dependent packages count: 1.4%
Downloads: 1.7%
Stargazers count: 2.1%
Average: 3.4%
Forks count: 5.2%
Dependent repos count: 6.6%
Maintainers (6)
Last synced:
4 months ago
proxy.golang.org: github.com/scikit-learn-contrib/mapie
- Documentation: https://pkg.go.dev/github.com/scikit-learn-contrib/mapie#section-documentation
- License: bsd-3-clause
-
Latest release: v1.0.1
published 8 months ago
Rankings
Dependent packages count: 5.4%
Average: 5.5%
Dependent repos count: 5.7%
Last synced:
4 months ago
proxy.golang.org: github.com/scikit-learn-contrib/MAPIE
- Documentation: https://pkg.go.dev/github.com/scikit-learn-contrib/MAPIE#section-documentation
- License: bsd-3-clause
-
Latest release: v1.0.1
published 8 months ago
Rankings
Dependent packages count: 5.4%
Average: 5.5%
Dependent repos count: 5.7%
Last synced:
4 months ago
conda-forge.org: mapie
- Homepage: https://pypi.org/project/MAPIE/
- License: BSD-3-Clause
-
Latest release: 0.5.0
published about 3 years ago
Rankings
Stargazers count: 15.2%
Forks count: 22.7%
Dependent repos count: 24.4%
Average: 28.5%
Dependent packages count: 51.6%
Last synced:
4 months ago
Dependencies
requirements.dev.txt
pypi
- bump2version ==1.0.1
- flake8 ==4.0.1
- ipykernel ==6.9.0
- jupyter ==1.0.0
- mypy ==0.941
- numpy ==1.22.3
- numpydoc ==1.1.0
- pandas ==1.3.5
- pytest ==6.2.5
- pytest-cov ==3.0.0
- scikit-learn ==1.0.1
- sphinx ==4.3.2
- sphinx-gallery ==0.10.1
- sphinx_rtd_theme ==1.0.0
- twine ==3.7.1
- wheel ==0.37.0
.github/workflows/publish.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
.github/workflows/test.yml
actions
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
requirements.ci.txt
pypi
- codecov *
- flake8 *
- mypy *
- pandas *
- pytest *
- pytest-cov *
- typed-ast *
requirements.doc.txt
pypi
- lightgbm ==3.2.1
- matplotlib ==3.5.1
- numpydoc ==1.1.0
- pandas ==1.3.5
- sphinx ==4.3.2
- sphinx-gallery ==0.10.1
- sphinx_rtd_theme ==1.0.0
- typing_extensions ==4.0.1
setup.py
pypi