diff --git a/ai-engine/services/single_match_orchestrator.py b/ai-engine/services/single_match_orchestrator.py index 45da207..f23998c 100755 --- a/ai-engine/services/single_match_orchestrator.py +++ b/ai-engine/services/single_match_orchestrator.py @@ -925,6 +925,7 @@ class SingleMatchOrchestrator: prediction.handicap_confidence = hcap_top * 100.0 # ── Score Prediction: Model-first, heuristic fallback ────────── + ms_edge = prediction.ms_home_prob - prediction.ms_away_prob score_result = self._predict_score_with_model(features) if score_result is not None: # ML model predicted scores @@ -939,7 +940,7 @@ class SingleMatchOrchestrator: # Heuristic fallback (original formula) base_home_xg = max(0.25, (float(data.home_goals_avg) + float(features.get("away_xga", data.away_conceded_avg))) / 2.0) base_away_xg = max(0.25, (float(data.away_goals_avg) + float(features.get("home_xga", data.home_conceded_avg))) / 2.0) - ms_edge = prediction.ms_home_prob - prediction.ms_away_prob + # ms_edge already computed above total_target = max( 1.4, min(