pympcc.merit_cross_check¶
- pympcc.merit_cross_check(result, problem)[source]¶
Cross-check three independent MPCC merit functions at
result.x.Disagreement between merits localises numerical trouble: one merit can mask issues another exposes (PATH ships this cross-check at termination time). All three should be comparable in magnitude on a healthy converged point.
Returns a dict with:
fb_max/fb_mean— |G + H − √(G² + H²)| (Fischer-Burmeister).min_map_max/min_map_mean— |min(G, H)| (min-map).inner_product_max/inner_product_mean— |G · H| (matchesresult.comp_residual/result.comp_residual_mean).disagreement_ratio— max / min of the three max-norms after flooring the denominator at1e-16(ratio close to 1 ⇒ merits agree; large ratio ⇒ scaling mismatch or ill-conditioning).
- Return type:
- Parameters:
result (MPCCResult)
problem (MPCCProblem)