Repository navigation
#1036: Fix S- and X-learner bootstrap confidence interval reproducibility - #1041
su-jin1425 wants to merge 3 commits into
Conversation
…p CIs reproducible
In three classes, the PR puts
Fix: keep every existing argument in its current position.
Fix: in each Then add a test: two |
…learner - Make random_state keyword-only (after *args) in XGBTRegressor and MLPTRegressor - Append random_state as the last argument in XGBTClassifier - Fall back to constructor self.random_state in BaseTLearner.fit when store_bootstraps=True - Add regression tests for positional argument preservation and predict(return_ci=True) reproducibility
3ee4718 to
b1f714e
Compare
|
@jeongyoonlee check now i have made few changes. |
Proposed changes
Fixes #1036.
S- and X-learner bootstrap confidence intervals were using the global NumPy random state, making results change when unrelated code consumed the global RNG.
This change:
random_statesupport to the affected S- and X-learner classes.check_random_state.random_stateis preserved throughget_params()andclone().The existing T-learner seeded bootstrap path and DR-learner behavior are preserved.
Before and After
Test
Types of changes
Checklist
Further comments
The fix uses the existing
check_random_stateapproach established by #1035 and keeps the change limited to bootstrap random-state handling and its regression coverage.