You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI re-review P3 items, all documentation-only:
- Scenario 3 operation chain: said "analytical TSL via strata + PSU",
but aggregate_survey()'s returned second-stage design is pweight
with geographic PSU clustering and no stage-2 strata. Reworded to
match the actual second-stage design surface being benchmarked.
- ImputationDiD "consistently dominant" claim in scaling finding #2
and hotspot table row #2: at Rust medium SunAbraham clearly leads
(0.353s vs 0.214s). Both claims narrowed to "Python all scales +
Rust small/large" with the Rust-medium SunAbraham exception called
out explicitly; the "together ~70-80% of the chain" framing
preserves the optimization recommendation.
- SDiD narrative said sensitivity_to_zeta_omega and in_time_placebo
are the two largest at every scale/backend, but at Rust small
bootstrap_variance slightly edges both (at sub-50ms totals, per-
phase fixed overhead dominates ranking). Qualified to Python all
scales + Rust medium/large.
Docs-only. No script or baseline changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| 1 |`diff_diff/survey.py:1160``_compute_stratified_psu_meat`| BRFSS @ 1M rows | dominates BRFSS chain at all scales, ~100% at 1M rows |**Algorithmic fix, highest priority.** Function called once per (state, year) cell (500 calls); per-call work rebuilds stratum-PSU scaffolding every time. Precompute stratum indexes once at `aggregate_survey` top-level and reuse. |
155
-
| 2 |`diff_diff/imputation.py` ImputationDiD fit | Staggered CS @ 1,500 units | dominant phase of the CS chain under both backends at all scales; SunAbraham narrows the gap under Rust at large but ImputationDiD still leads|**Investigate only after BRFSS fix lands.** Total chain is well under practitioner-perceptible threshold; candidate follow-up. |
160
+
| 2 |`diff_diff/imputation.py` ImputationDiD fit | Staggered CS @ 1,500 units | dominant phase under Python at every scale and under Rust at small/large; at Rust medium SunAbraham takes the top spot. Together ImputationDiD + SunAbraham are ~70-80% of the chain at every scale|**Investigate only after BRFSS fix lands.** Total chain is well under practitioner-perceptible threshold; candidate follow-up. |
156
161
| 3 |`diff_diff/utils.py:1434``_sc_weight_fw_numpy`| SDiD python @ any scale | dominates Python SDiD at all scales |**Already ported to Rust.** Python fallback acceptable as a teaching/safety path; non-production for n > 100. Python skipped at n=500 (jackknife cost would exceed 4 minutes per run). |
157
162
| 4 |`diff_diff/chaisemartin_dhaultfoeuille.py` dCDH fit + heterogeneity | Reversible (single scale) | main fit and survey-aware heterogeneity refit each rebuild TSL scaffolding; heterogeneity phase is as expensive as the main fit |**Cache/precompute** - heterogeneity refit duplicates the main fit's TSL setup under the same `SurveyDesign`. Not P0; newer code path (v3.1) never optimization-reviewed. |
158
163
| 5 |`diff_diff/continuous_did.py` CDiD spline bootstrap | Dose-response (single scale) | four spline fits ~equal, linear in variant count |**Leave alone** - well under perceptible threshold. |
0 commit comments