Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conformal prediction with conditional guarantees #455

Open
wants to merge 180 commits into
base: master
Choose a base branch
from

Conversation

Damien-Bouet
Copy link
Collaborator

@Damien-Bouet Damien-Bouet commented May 28, 2024

Description

Implementation of new classes SplitCPRegressor and CCPCalibrator (and other subclasses) to implement the method proposed by Gibbs et al. (2023), and described in the issue #449

Fixes #449

Type of change

Please remove options that are irrelevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Add tests to cover all the new features
  • Still pass the old tests

Checklist

  • I have read the contributing guidelines
  • I have updated the HISTORY.rst and AUTHORS.rst files
  • Linting passes successfully : make lint
  • Typing passes successfully : make type-check
  • Unit tests pass successfully : make tests
  • Coverage is 100% : make coverage
  • Documentation builds successfully : make doc

@Damien-Bouet Damien-Bouet linked an issue May 28, 2024 that may be closed by this pull request
Copy link
Collaborator

@thibaultcordier thibaultcordier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good first PR, thank you a lot! I give you some suggestions (format, style, code, content ...). To sum up:

  • Transform PhiFunction into abstract class.
  • Make the comparison with MapieRegressor to foow the same steps (check for instance).
  • Remove verbose warning and duplicate checks.

mapie/regression/__init__.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/utils/ccp_phi_function.py Outdated Show resolved Hide resolved
mapie/regression/utils/ccp_phi_function.py Outdated Show resolved Hide resolved
mapie/regression/utils/ccp_phi_function.py Outdated Show resolved Hide resolved
mapie/regression/utils/ccp_phi_function.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@LacombeLouis LacombeLouis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Damien-Bouet,
Thank you and well done!
I have made some initial comments in the ccp_regression.py file. The main thing that I'm noticing is a lot of cast() and functions that seem exist in other classes. Please note these initial comments, I will have a look further regarding the other files.

mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
mapie/regression/ccp_regression.py Outdated Show resolved Hide resolved
Damien-Bouet and others added 30 commits August 9, 2024 10:30
…classification

Adaptation of Conditional CP method to classification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conformal Prediction With Conditional Guarantees
6 participants