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
{{ message }}
Repository navigation
repo compare: sign_flip_summary warns (overflow) computing mde for deltas near the float maximum #769
repos/compare.pysign_flip_summary computes mde as min_detectable(sd, n) (repos/compare_reach.py:26, (t.ppf(...) + t.ppf(...)) * sd / sqrt(n)) and rounds it with _round (round(value, 6) on a numpy float64). For a spread near the float maximum the product leaves the range.
Repro (offline, warnings.simplefilter("error")): sign_flip_summary([{"task": "t", "baseline": 0.0, "treatment": x, "delta": x} for x in [sys.float_info.max, 1.0, 1.0, 1.0, 1.0, 1.0]]) raises RuntimeWarning: overflow encountered in scalar multiply at compare_reach.py:26; with twelve deltas of plus and minus 1e307 it raises RuntimeWarning: overflow encountered in multiply in _round (compare.py:756) for an mde of 9.3e306. Without -W error the mde is inf or the unrounded value. The interval search itself no longer warns for these rows.
repo compare drops task values past 1e150, so the CLI does not reach this; a caller of sign_flip_summary does.
Fix options: compute the mde on a scaled sd as the interval search does, or leave mde as None when the product is not finite; round with float(value) so the rounding cannot overflow.
Activity