Refactor compute_bootci to use scipy.stats.bootstrap#505
Merged
raphaelvallat merged 2 commits intomainfrom Mar 28, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #505 +/- ##
==========================================
- Coverage 98.36% 98.36% -0.01%
==========================================
Files 19 19
Lines 3311 3305 -6
Branches 492 488 -4
==========================================
- Hits 3257 3251 -6
Misses 32 32
Partials 22 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7db448b to
0000d2d
Compare
0000d2d to
74aa59f
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #189
Summary
Replaces the internal bootstrap implementation in
compute_bootciwithscipy.stats.bootstrap, raises the minimum SciPy requirement to 1.10, and upgrades the default CI method to BCa.Changes
compute_bootciscipy.stats.bootstrapcper(bias-corrected percentile, legacy)bca(bias-corrected and accelerated)norm,per,cperbca,per,basic,normbca: corrects for both bias and skewness via jackknife resampling; thegold-standard method recommended in the bootstrap literature.
basic: basic (pivotal) bootstrap.cper: legacy bias-corrected percentile method (no acceleration); superseded bybca.mean,std,var) now useaxis=-1convention required byscipy.stats.bootstrap.Minimum SciPy version
Bumped from
1.8.0→1.10.0inpyproject.tomland CI matrix.scipy.stats.bootstrapgained theBCamethod in 1.9 and stabilized in 1.10.Tests & docs
cper-specific test cases; addedbcaandbasicto the combination test.Breaking changes
method="cper"(and"cpercentile") is no longer valid — raisesAssertionError.cpertobca; numerical outputs will differ for existingcode that relied on the default.