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
Doc / release-note alignment for the v1.4.0 tag plus the CI flake fix
that v1.4.0 carries forward:
- pyproject.toml + __version__ bumped 1.3.0 → 1.4.0 (owner pre-set)
- CHANGELOG.md: the pre-existing [1.4.0] section gains a Fixed entry
recording the CausalForest parity-test deflake
- README.md / README_CN.md: headline banner rewritten around Sprint-2
(panel shift-share, real-LLM adapters, particle-filter assimilation,
3 new guides), with "v1.3 stable foundation (carried forward)" row
- docs/index.md: "Current release" callout + release-highlights table
now lead with v1.4.0
- BibTeX version fields in README.md, README_CN.md, and docs/index.md
bumped 1.3.0 → 1.4.0 so academic citations match
CausalForest parity-test deflake
- tests/external_parity/test_causalml_book.py::
test_forest_ate_recovers_average_tau was flaking on
ubuntu-latest + Python 3.10 because only the data-gen RNG was
seeded — the forest's bootstrap + honest splits were unseeded,
so the ATE estimate varied ±0.3 across the matrix and the
|ATE - 0.5| < 0.3 tolerance occasionally tripped.
- Fixed by passing random_state=0 + n_estimators=300 and bumping
n=600 → n=1500 so the test is reproducibly deterministic on every
OS × Python combo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,19 @@ StatsPAI is the **agent-native** Python package for causal inference and applied
15
15
16
16
It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/CausalInference.html) (fixest, did, rdrobust, gsynth, DoubleML, MatchIt, CausalImpact, ...) and Stata's core econometrics commands into a single, consistent Python API.
17
17
18
-
**🎉 NEW in v1.0.1 — Stable API release: research-frontier capstone + independent-review correctness pass**
18
+
**🎉 NEW in v1.4.0 — v3-frontier Sprint 2: panel shift-share, real-LLM adapters, particle-filter assimilation, 3 new guides**
19
19
20
-
StatsPAI 1.0 is the capstone of three years of development. Semantic-versioning starts here: the public API is the set of names in `statspai.__all__` as of this tag. **Every Critical / High / Medium finding from the independent code-review-expert pass has been fixed and pinned by regression tests** — including the Katz RR SE, inverse-variance Cochran Q, PCMCI Fisher-z effective-sample-size, cluster-robust cohort-anchored DiD, TMLE regime-offset, real HDR conformal density, IPW-based EWM bridge, MVMR conditional F, BCF point/CI alignment, conformal-fair small-group fallback, and the LLM-prompt sanitization. v1.0.1 additionally closes the two `NEEDS_VERIFICATION` items with paper-grounded implementations (Abadie κ-weighted complier QTE and a real dual-path PCI bridge).
20
+
StatsPAI 1.4 is Sprint 2 of the 知识地图 v3 roadmap. Closes the four secondary items flagged at the end of Sprint 1: multi-period Park-Xu political shift-share, real OpenAI / Anthropic LLM adapters for the Causal MAS discovery agent, a particle-filter backend for `causal_kalman` to handle non-Gaussian priors and nonlinear dynamics, and three new MkDocs guides covering the v3 frontier. 20 unused-import cleanups across Sprint 1 modules. One CI flake (CausalForest ATE parity test) deflaked by seeding the forest explicitly.
|**Target Trial Emulation flagship**| JAMA 2022 7-component protocol + **JAMA/BMJ 2025 TARGET Statement 21-item reporting checklist** auto-filled from the protocol + result pair. `target_trial_report(result, fmt='markdown'/'latex'/'target')` renders a STROBE-compatible paper block. |
27
-
|**Agent-native platform**|`sp.list_functions()` / `sp.describe_function()` / `sp.function_schema()` expose OpenAI/Anthropic tool-calling schemas for 785+ registered estimators. `sp.agent.mcp_server` ships a scaffold MCP server so external LLMs can call every StatsPAI function via natural-language tool invocation. |
28
-
|**Independent review transparency**| 3 Critical + 5 High + 6 Medium + 2 Low findings from code-review-expert, documented and closed in the v1.0.0 + v1.0.1 commits. 2 706+ tests passing, zero regressions across the pre-existing suite. Pinning regression tests in `tests/test_v100_review_fixes.py` and `tests/test_v101_verified_fixes.py` lock every correctness fix. |
24
+
|**Panel shift-share IV**|**`sp.shift_share_political_panel`** — Park-Xu (2026) §4.2 multi-period extension: time-varying shares + time-varying shocks, pooled 2SLS with unit / time / two-way FE, per-period event-study table + aggregate Rotemberg top-K. Recovers τ = 0.30 within 0.003 on synthetic 30×4 panels. |
25
+
|**Real-LLM adapters (Causal MAS)**|**`sp.causal_llm.openai_client`** — OpenAI SDK ≥ 1.0 (supports Azure / vLLM / Ollama via `base_url`). **`sp.causal_llm.anthropic_client`** — Anthropic Messages API ≥ 0.30, defaults to `claude-opus-4-7`. **`sp.causal_llm.echo_client`** — deterministic scripted-response client for offline tests. Lazy-imported SDKs → zero new runtime deps on the core package. |
26
+
|**Particle-filter assimilation**|**`sp.assimilation.particle_filter`** — bootstrap-SIR particle filter with systematic resampling (Gordon-Salmond-Smith 1993; Douc-Cappé 2005). Non-Gaussian priors, heavy-tailed observation noise, nonlinear dynamics via pluggable callbacks. Agrees with exact Kalman to ~0.003 under Gaussian DGPs. **`sp.assimilative_causal(..., backend='particle')`** routes the end-to-end wrapper. |
|**Agent-native platform**|`sp.list_functions()` / `sp.describe_function()` / `sp.function_schema()` expose OpenAI/Anthropic tool-calling schemas for 874+ registered estimators. 5 new hand-written `FunctionSpec` entries this release. `sp.agent.mcp_server` MCP scaffold lets external LLMs call every StatsPAI function via natural-language tool invocation. |
30
+
|**CI/CD hygiene**|`tabulate` hard-dep from v1.3.0 carried forward. Deflaked `test_forest_ate_recovers_average_tau` by seeding the forest explicitly (`random_state=0`, `n_estimators=300`, larger `n`). 2 699+ tests passing across all OS × Python matrix entries. |
29
31
30
32
**Previously in v0.9.2 — Decomposition Analysis**: **18 first-class decomposition methods across 13 modules (~6,200 LOC, 54 tests)**, unified under `sp.decompose(method=...)`. Mean (Blinder-Oaxaca/Gelbach/Fairlie/Bauer-Sinning/Yun), distributional (RIF/FFL/DFL/Machado-Mata/Melly/CFM), inequality (Theil/Atkinson/Dagum/Shapley/Lerman-Yitzhaki), demographic (Kitagawa/Das-Gupta), and causal (gap_closing/mediation_decompose/disparity_decompose). Closed-form influence functions for Theil/Atkinson, weighted O(n log n) Dagum Gini, cross-method consistency checks.
它将 R 的 [Causal Inference Task View](https://cran.r-project.org/web/views/CausalInference.html)(fixest、did、rdrobust、gsynth、DoubleML、MatchIt、CausalImpact、sfaR、lme4、oaxaca、ddecompose……)和 Stata 的核心计量命令(`frontier`、`xtfrontier`、`mixed`、`meglm`、`mixlogit`、`ivqreg`……),统一到一个一致的 Python API 中。
0 commit comments