Skip to content

Docs P2/P3: choosing-an-estimator, IHDP tutorial, FAQ, uncertainty catalog - #1025

Merged
jeongyoonlee merged 7 commits into
masterfrom
docs/p2-p3-guides
Aug 17, 2026
Merged

Docs P2/P3: choosing-an-estimator, IHDP tutorial, FAQ, uncertainty catalog#1025
jeongyoonlee merged 7 commits into
masterfrom
docs/p2-p3-guides

Conversation

@jeongyoonlee

@jeongyoonlee jeongyoonlee commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

The P2 and P3 items from the docs roadmap, as one PR. Four new pages and two upgraded ones:

New pages (P2)

  • Choosing an Estimator — a data-situation decision path (randomized? compliance? confounders measured? instrument?) plus a capability matrix over the estimators (outcome/treatment types, observational support, uncertainty, extras). Replaces the Decision Guide image removed in Docs phase 2: correctness pass over the published pages, and a five-section structure #1018 with reviewable rst; every cell checked against live class signatures. Modeled on EconML's flowchart + comparison table.
  • Estimating and Validating Heterogeneous Treatment Effects — an end-to-end walkthrough on IHDP via fetch_ihdp() (Benchmark datasets, ground-truth metrics and a leaderboard (v1.0 M3) #1015), the standard HTE testbed: confounded assignment makes the overlap check real, simulated potential outcomes give per-unit ground truth. It opens with an explicit identification statement (unconfoundedness given the covariates — true by construction on IHDP, untestable on real data), trains one estimator per family (X-learner, R-learner, honest CausalRandomForestRegressor, jax DragonNet), and walks the evaluation toolkit with built-in lessons: the R-learner's ATE interval is the narrowest and the only one excluding the truth; DragonNet wins ground-truth PEHE (0.455) while the R-learner fails (2.13); the blind validation losses recover that verdict without seeing the truth; at 75 validation rows RATE's only significant p-value lands on the worst model (a multiple-testing accident, taught as such) while at 374 rows the real X-learner signal appears; gain/TOC curves show why AUUC favors DragonNet's broad margin and RATE the X-learner's early concentration; sensitivity analysis and the across-replications protocol close it out (DragonNet uniquely stable at 0.599 ± 0.054 over 10 reps), with the caution that the CEVAE/DragonNet papers aggregate over the 1,000-replication release while causalml ships 100. A final Summary recaps the workflow and per-model verdicts. Every output is from one seeded run executed in page order; figures are pre-rendered so the docs build stays offline. Modeled on DoubleML's workflow page.
  • FAQ — nine questions seeded from the real support surface: macOS OpenMP, CA-cert download failures, the honesty=True default change, the n_jobs default change, negative Qini, overlap violations, Twins 9999 encoding, IHDP replication alignment, when the neural extras are needed.
  • Uncertainty Quantification — what CI/SE each estimator family and metric reports and how to request it (analytic vs bootstrap ATE CIs, bootstrap CATE CIs, forestci infinitesimal-jackknife forest variance, metric return_ci semantics), consolidating an API surface spread across the classes. Modeled on EconML's Inference chapter.

Upgraded pages (P3)

  • Methodology — each family section now opens with a Relevant classes lead, and the intro routes method selection to the new choosing page. This is the roadmap's in-place alternative to splitting the page, which would break every methodology:* label and external deep link; a future split can follow behind sphinx-reredirects without losing this.
  • Intro — a 200-replication simulation on the package's own synthetic data showing the difference in means biased +0.40 on a true ATE of 0.5 while a T-learner centers at +0.09, with pre-rendered figure.

Getting Started gains tutorial and faq; the User Guide gains choosing_an_estimator (first) and inference. Docs-only; sphinx -W exit 0 on html, epub and latex; toctree-reachability test passes.

🤖 Generated with Claude Code

jeongyoonlee and others added 6 commits August 16, 2026 01:45
Four pages the docs roadmap identified as missing relative to EconML, DoubleML
and grf:

- choosing_an_estimator.rst: a data-situation decision path plus a capability
  matrix over the estimators, replacing the Decision Guide image removed in
  #1018 with reviewable rst. Every cell was checked against the live class
  signatures.
- tutorial.rst: a complete first analysis on the LaLonde experiment via
  fetch_lalonde (#1015) -- benchmark, overlap check, ATE with CIs bracketing
  the $1,794 experimental estimate, CATE, held-out Qini/RATE (finding no
  validated heterogeneity at n=445, stated as such), interpretation, and
  sensitivity analysis. All outputs come from a real seeded run; the overlap
  figure is pre-rendered so the docs build stays offline.
- faq.rst: nine questions seeded from the real support surface (macOS OpenMP,
  CA-certificate download failures, the honesty default change, the n_jobs
  default change, negative Qini, overlap violations, the Twins 9999 encoding,
  IHDP replication alignment, when the neural extras are needed).
- inference.rst: a catalog of what uncertainty each estimator family and
  metric reports and how to request it, consolidating an API surface spread
  across the classes.

Getting Started gains tutorial and faq; the User Guide gains
choosing_an_estimator (first) and inference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…he intro

The roadmap's P3 alternatives were splitting methodology.rst into per-family
pages (breaking every methodology:* label and external deep link) or adopting
the template in place. This does the latter: each family section opens with a
"Relevant classes" lead naming the estimators that implement it, and the page
intro points method selection to the new choosing_an_estimator page. The
split, if ever done, can follow behind sphinx-reredirects without losing this.

The intro gains a simulation on the package's own synthetic data: 200
replications where the difference in means is biased +0.40 on a true ATE of
0.5 while a T-learner centers at +0.09, with the figure pre-rendered so the
build stays fast and offline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LaLonde carries only an experimental ATE, so the tutorial's heterogeneity
steps had no truth to check against. Twins (fetch_twins) observes both twins
of each pair, so both potential outcomes are measured rather than simulated
and the per-unit effect is known.

The evaluation step now teaches with ground truth: the default XGB X-learner
scores worse than predicting zero effect on held-out PEHE and its RATE is
significantly negative (p = 0.006) -- overfitting individual noise -- and a
regularized refit brings PEHE to the zero baseline, cuts the ATE error 3x,
and returns a null RATE. The honest conclusion is stated: +1.6pp survival
from higher birth weight, no heterogeneity that survives a held-out test.

The outcome is modeled as survival so a positive effect is a benefit, the
orientation the ranking metrics assume. All outputs are from a real seeded
run; the overlap figure now shows the flat propensity a coin-flip assignment
produces.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Twins measures its ground truth but its randomized assignment made the
overlap step trivial and its near-null heterogeneity left little for the
evaluation methods to disagree about. IHDP is the standard HTE testbed:
confounded assignment (so the overlap picture is real), simulated potential
outcomes (so per-unit truth exists), and enough structure that estimators
genuinely differ.

The tutorial now trains S/T/X/R-learners on a shared XGB base learner and
walks the full evaluation toolkit: ATEs where the R-learner's interval is the
narrowest and the only one excluding the truth; ground-truth PEHE/ate_error
where the R-learner fails outright; then the same verdict recovered blind --
both validation losses (dr_score, plug_in_t_score) flag the R-learner without
seeing the truth, while RATE/Qini intervals all span zero at 75 validation
rows, teaching when each method has power. A final section shows the
across-replications protocol and defers to the benchmark leaderboard as its
canonical form.

Also documents in passing that ElasticNetPropensityModel's default CV grid
collapses to the treated share on this data, so the tutorial widens Cs
explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two new steps. Step 7 re-splits the replication's 747 units in half so the
ranking metrics get 374 validation rows instead of 75, and pairs the tables
with their curves: the gain curves hug the random diagonal (AUUC ~0.53 for
all four models), the TOC curves spike to ~1.5 excess ATE in the top few
percent, and RATE's autoc weighting turns that concentration into the one
significant verdict (X-learner 0.381, CI 0.006-0.757, p=0.046) -- showing why
gain/AUUC and TOC/RATE both exist. Step 8 closes with sensitivity analysis:
the placebo collapses the estimate by 96% while adding a random cause or
halving the sample barely moves it.

The replication-protocol section becomes Step 9. All outputs are from a real
seeded run; both figures are pre-rendered so the docs build stays offline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ummary

The estimator lineup becomes one model per family -- X-learner, R-learner,
CausalRandomForestRegressor with its default honesty, and the jax DragonNet
(with an extras install note) -- replacing the S- and T-learners, and the page
is retitled "Estimating and Validating Heterogeneous Treatment Effects" to
match what it has become.

The cross-family lineup sharpens every lesson. DragonNet, built against
benchmarks like IHDP, wins ground-truth PEHE on the replication and is the
only estimator stable across the heavy-tailed replications (0.599 +/- 0.054
over 10 reps while everything else blows past 3.5); the causal forest is
accurate on average yet ranks no better than random; and at 75 validation
rows RATE's only nominally significant p-value now lands on the worst model
-- four models tested at once, so one accidental p < 0.05 is what noise
produces -- before 374 rows restore the real X-learner signal. AUUC and RATE
disagree on the winner (DragonNet's broad thin margin vs the X-learner's
early concentration), which the gain/TOC curves display and the prose turns
into the division-of-labor lesson.

Step 3 now opens with an explicit identification statement (unconfoundedness
given the 25 covariates, true by construction here, untestable on real data),
Step 9 gains the caution that the CEVAE and DragonNet papers aggregate over
the 1,000-replication IHDP release while CausalML ships the 100-replication
file (the FAQ's "1,000" is corrected and the datasets page states the
provenance), and a closing Summary recaps the workflow and the per-model
verdicts. Every output is from one seeded run executed in page order, so the
page reproduces top to bottom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeongyoonlee jeongyoonlee changed the title Docs P2/P3: choosing-an-estimator, LaLonde tutorial, FAQ, uncertainty catalog Docs P2/P3: choosing-an-estimator, IHDP tutorial, FAQ, uncertainty catalog Aug 16, 2026
The README's documentation section pointed only at the About page. It now
links the three pages a newcomer needs first -- the end-to-end tutorial, the
choosing-an-estimator guide and the FAQ -- and a new section covers the
benchmark dataset loaders, ground-truth metrics and the leaderboard notebook
added by #1015. The References link that read "API documentation" but pointed
at About now points at the API reference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeongyoonlee jeongyoonlee added the documentation Improvements or additions to documentation label Aug 16, 2026
@jeongyoonlee
jeongyoonlee merged commit 35f6e73 into master Aug 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants