S-, T- and X-learner bootstrap confidence intervals are not reproducible
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- numpy, python, scikit-learn
- Ambito
- machine-learning
Direzione di ricerca
Inizia dalla dipendenza #1035 e da BaseLearner.bootstrap() in base.py:117, quindi esamina i call site degli S-, X- e legacy T-learner elencati in slearner.py, xlearner.py e tlearner.py. Il lavoro è completo quando le classi learner interessate espongono il parametro seeded, gli intervalli bootstrap sono riproducibili indipendentemente dal flusso NumPy globale ed è presente la copertura del round-trip di clone()/get_params.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Depends on #1035 — that issue establishes the single check_random_state normalization path this one threads through the S- and X-learner families. Landing this first would mean either duplicating that decision or redoing it.
BaseLearner.bootstrap() (base.py:117) takes an optional rng and falls back to the global numpy stream when it is not supplied (base.py:133-137). #1032 fixed this for the R-learner (#1029). The remaining callers still pass no rng, so on master the R-learner is the only meta-learner whose bootstrap confidence intervals are reproducible:
slearner.py:215,:308xlearner.py:305,:422tlearner.py:297,:395— the legacy loop only. T-learner'sfit(store_bootstraps=True)→fit_bootstrap_ensemble()path from #886 is already seeded, and that is whatpredict(return_ci=True)uses.
DR-learner is unaffected: it threads an explicit per-call seed.
So BaseSRegressor(...).estimate_ate(..., bootstrap_ci=True) returns different intervals on every call, and unrelated consumption of the global numpy stream between calls changes the result. There is currently no way for a caller to pin them.
Note this is not purely a threading fix: grep -c random_state is 0 for both slearner.py and xlearner.py, so they have no random_state parameter to thread. Adding one is a backward-compatible API addition, which is why #1029 scoped itself to the R-learner.
Since #912 these are BaseEstimators, so the new parameter must be stored verbatim in __init__ per the scikit-learn convention, and each affected class wants clone() / get_params round-trip coverage. That is seven classes across two families: BaseSLearner, BaseSRegressor, BaseSClassifier, LRSRegressor (which constructs StatsmodelsOLS for the caller and needs care), plus BaseXLearner, BaseXRegressor, BaseXClassifier.
Suggested order: land #1035 first, then add random_state to BaseSLearner and BaseXLearner and pass rng at the six call sites.
Observed on master (477cd0a).
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 6k
- Fork
- 892
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uber/causalml
-
Add a pickle-size regression test for fitted learners (v1.0 M1)Forse già presa @techi101 l’ha presa 7 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
-
BaseRClassifier ignores cv_n_jobs during outcome cross-validationForse già presa @ayuxy027 l’ha presa 17 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
cate_scoring default learner is oversized for its own per-fold, per-arm call patternForse già presa @su-jin1425 l’ha presa 78 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
sklearn metadata routing: let `treatment` reach a learner inside a PipelineForse di nuovo libera @su-jin1425 l’ha presa 90 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Tutte le issue di uber/causalml
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
splunk/security_content#4418 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
bug(pipelines): shortcode stripping deletes text between a {{< >}} shortcode and the next {{% %}}Forse già presa @Ashborne-lab l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kubeflow/docs-agent#293 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Imbad0202/academic-research-skills#1093 ·
I maintainer di solito rispondono entro 1 giorno
-
Input: placeholder drawn in the text colour when the empty Input is focused but not yet editedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierreaubert/gpui-toolkit#114 ·
I maintainer di solito rispondono entro 1 giorno