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

506 ccp reoptimize inference #507

Merged

Conversation

Damien-Bouet
Copy link
Collaborator

@Damien-Bouet Damien-Bouet commented Aug 8, 2024

Description

I added a re-optimization for each X_n+1 at inference time (in the predict). The old split method is still available with mapie.predict(X, unsafe_approximation=True).
Fixes #506

Type of change

Please remove options that are irrelevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update (it was already updated in the doc)

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

  • Unit test
  • demo/tutorial notebook

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 self-assigned this Aug 8, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (449-cp-with-conditional-guarantees@744d56f). Learn more about missing BASE report.

Additional details and impacted files
@@                          Coverage Diff                           @@
##             449-cp-with-conditional-guarantees      #507   +/-   ##
======================================================================
  Coverage                                      ?   100.00%           
======================================================================
  Files                                         ?        73           
  Lines                                         ?      6639           
  Branches                                      ?      1129           
======================================================================
  Hits                                          ?      6639           
  Misses                                        ?         0           
  Partials                                      ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +56 to +63
Warning:

In this tutorial, we use ``unsafe_approximation=True`` to have a faster
computation (because Read The Docs examples require fast computation).
This mode use an approximation, which make the inference (``predict``) faster,
but induce a small miscoverage. It is recommanded not to use it, or be
very careful and empirically check the coverage and a test set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I needed to temporally use the old method (with unsafe_approximation=True), which doesn't have the theoretical guarantees, otherwise the documentation was in timeout. I will need to change the dataset, to have faster computation, or transform this .py tuto in the doc, into a true notebook, which is not run during the documentation build.
Indeed, showing in the first tuto, the deprecated method which doesn't have guarantees is not a good idea.

@thibaultcordier thibaultcordier marked this pull request as ready for review October 22, 2024 15:59
@thibaultcordier thibaultcordier merged commit a3664f5 into 449-cp-with-conditional-guarantees Oct 22, 2024
8 checks passed
@Valentin-Laurent Valentin-Laurent deleted the 506-ccp-reoptimize-inference branch November 12, 2024 13:37
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.

3 participants