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
fix: resolve 7 substantive logic bugs in fairness/optimization/welfare
1. equalized_odds: skip groups with no positives (TPR) or no negatives
(FPR) — undefined rates were defaulting to 0.0 and producing
artificial disparity (e.g. perfect classifier returning 1.0 not 0.0).
2. equal_opportunity: same fix — only compute TPR for groups that have
at least one positive label; fewer than 2 valid groups → 0.0 disparity.
3. Fairness constructor: invalid-metric validation now uses error() so it
raises ErrorException (as the test expects) instead of AssertionError.
Threshold/weight remain @Assert (tested as AssertionError elsewhere).
4. value_score for Welfare: normalize raw welfare sum by :max_welfare from
state when present so weighted_score stays in [0,1]; clamp to [0,1]
when max_welfare absent.
5. verify_value for Safety: when proof[:verified] is false, return false
immediately before the critical-prover check — the test supplies
proof_invalid without a :prover key and expects false, not an error.
https://claude.ai/code/session_01PWMMxryCcPrAjJ8tuGvygG
0 commit comments