Commit dbb29c4
feat(core): implement v7.1 statistical correctness fixes
Based on statistician review of v7.0 W₁ implementation:
1. Use raw W₁ in inference (not debiased/clamped)
- Debiased W₁ is display-only to show effect above noise floor
- Using debiased W₁ in likelihood would bias posterior
2. Calibrate θ_floor from null distribution
- Bootstrap null W₁ replicates via within-class splits
- c_floor = 95th percentile of scaled null W₁ values
- Replaces heuristic 1.64 * sqrt(var_rate) formula
3. Rename n_eff → n_blocks in floor calculations
- n_blocks = max(1, floor(n / L)) is block count
- n_eff = n / τ remains for IACT diagnostics
- Clarifies that we're counting blocks, not estimating ESS
4. Prior calibrated to θ_user (not θ_eff)
- P(W > θ_user) ≈ 0.62 under half-t prior
- Prior encodes threat model, not measurement limits
- θ_floor handled separately in decision logic
5. Add κ robustness to likelihood
- Student-t likelihood via κ ~ Gamma(ν_ℓ/2, ν_ℓ/2)
- Changed ν_ℓ from 8 to 4 (matches prior df)
- Guards against variance underestimation
6. Fix tail_slow_share denominator
- Conditional on tail (p95+): fraction that are slowdowns
- sum(max(d_i - shift, 0)) / sum(|d_i - shift|) for i in tail
- Operates on quantile-aligned diffs, not sample identities
All 418 tests passing. Updated spec to v7.1 and CHANGELOG.md.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 02f6ef8 commit dbb29c4
53 files changed
Lines changed: 12371 additions & 651 deletions
File tree
- crates
- tacet-core/src
- adaptive
- analysis
- tacet-c/src
- tacet/src
- adaptive
- output
- docs
- paper
- analysis
- outputs
- figures_old_perquantile
- figures
- src/tacet_analysis
- __pycache__
- results
- medium-perquantile
- medium-w1-distance
- website/src/content/docs/reference
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
12 | 22 | | |
13 | 23 | | |
14 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
| 374 | + | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
952 | | - | |
| 951 | + | |
| 952 | + | |
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
| 959 | + | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
| 962 | + | |
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | | - | |
| 990 | + | |
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
| |||
0 commit comments