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

Add tests for check_cv method with and without random_state #337

Conversation

thibaultcordier
Copy link
Collaborator

@thibaultcordier thibaultcordier commented Aug 4, 2023

Description

The modification proposes to resolve the bug by imposing a default value for random_state in check_cv method tests, so that the method retains split behavior even if random_state is set to None.

Fixes #336

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Test if check_cv retains split behavior if random_state is set to None.
  • Test if check_cv retains split behavior if random_state is set a certain value.

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

@thibaultcordier thibaultcordier self-assigned this Aug 4, 2023
@thibaultcordier thibaultcordier linked an issue Aug 4, 2023 that may be closed by this pull request
@thibaultcordier thibaultcordier added the Bug Type: bug label Aug 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0331c98) 100.00% compared to head (73b223a) 100.00%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #337   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines         4278      4303   +25     
  Branches       467       474    +7     
=========================================
+ Hits          4278      4303   +25     
Files Changed Coverage Δ
mapie/tests/test_utils.py 100.00% <100.00%> (ø)
mapie/utils.py 100.00% <100.00%> (ø)

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

@thibaultcordier thibaultcordier marked this pull request as ready for review August 9, 2023 10:10
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.

I think this fixes the problem. I just think some small details need to be added.

mapie/tests/test_utils.py Show resolved Hide resolved
mapie/tests/test_utils.py Show resolved Hide resolved
mapie/tests/test_utils.py Show resolved Hide resolved
mapie/tests/test_utils.py Show resolved Hide resolved
mapie/utils.py Show resolved Hide resolved
.readthedocs.yml Show resolved Hide resolved
@thibaultcordier thibaultcordier merged commit 3497c3d into master Aug 30, 2023
10 checks passed
@thibaultcordier thibaultcordier deleted the 336-cross-validation-not-seeded-implies-wrong-prediction-intervals branch September 20, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-validation not seeded implies wrong Prediction Intervals
3 participants