Commit a2f9cd5
fix(rdd): exact-constancy variance rescue for constant-float outcome sides
np.var of a constant 0.7 vector is ~1.3e-32 (single-pass mean roundoff)
while R's two-pass var() is exactly 0, so the var==0 rescue was skipped
for constant non-representable-float outcomes and the resulting Inf J_MV
crashed bin construction on a zero jump. Route the side variances through
the port's _var0 exact-constancy helper (the R semantics already ported
for the fuzzy identification stop), reproducing R's J=1 rescue, its Inf
J_IMSE / NaN J_MV echoes, and the variability warning. Regression test
with a constant-0.7 side added.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwhFMnFQGBumYfwbeQaUjm1 parent 4af6867 commit a2f9cd5
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
854 | 855 | | |
855 | 856 | | |
856 | 857 | | |
857 | | - | |
858 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
859 | 867 | | |
860 | 868 | | |
861 | 869 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
353 | 374 | | |
354 | 375 | | |
355 | 376 | | |
| |||
0 commit comments