Views
No views yet
2026.04.1predict_match(...) still needs compatible historical match datahome goalsaway goalsscorelinehome / draw / away probabilitiesconfidence levelconfidence scoreconfidence marginabstain / score-range signals for fragile matcheshome_team, away_team, and match_date when a compatible history CSV is available48 numeric signals at inference time.48 signals do not mean your history CSV must literally contain 48 raw columns.predict_match(home_team, away_team, match_date)model_versionexpected_home_goalsexpected_away_goalspredicted_home_goalspredicted_away_goalspredicted_scoreresult_probabilitiesraw_result_probabilitiesconfidence_levelconfidence_scoreconfidence_marginabstain_recommendedpredicted_score_range when triggereddecoder_diagnosticsrequestpredict_match_simple(home_team, away_team, match_date)model_versionpredicted_home_goalspredicted_away_goalspredicted_scoreresult_probabilitiesconfidence_levelconfidence_scoreconfidence_marginabstain_recommendedpredicted_score_range when triggeredrequestpredict_features(features)model_versionexpected_home_goalsexpected_away_goalspredicted_home_goalspredicted_away_goalspredicted_scoreresult_probabilitiesraw_result_probabilitiesconfidence_levelconfidence_scoreconfidence_marginabstain_recommendedpredicted_score_range when triggereddecoder_diagnosticspredict_features_simple(features)model_versionpredicted_home_goalspredicted_away_goalspredicted_scoreresult_probabilitiesconfidence_levelconfidence_scoreconfidence_marginabstain_recommendedpredicted_score_range when triggered1
2 README.md
3 LICENSE
4 CHANGELOG.md
5 RELEASE_GUIDE.md
6 MODEL_CARD.md
7 EVALUATION_SUMMARY.md
8 DATA_FORMAT.md
9 FAQ.md
10 QUICK_PUBLISH_CHECKLIST.md
11 ARTIFACTS_SHA256.txt
12 requirements.txt
13 pyproject.toml
14 sample_history.csv
15 sample_fixtures.csv
16 predict_one.py
17 predict_batch.py
18 demo_cli.py
19 smoke_test.py
20 demo_notebook.ipynb
21 la_liga_score_predictor/
22 __init__.py
23 predictor.py
24 feature_builder.py
25 artifacts/
26 la_liga_score_predictor.json
27 home_goals_model.cbm
28 away_goals_model.cbm
29 outcome_model.cbm1python3 -m venv .venv
2source .venv/bin/activate
3pip install .requirements.txt.sample_history.csv so the wrapper can be demonstrated without private data.120 synthetic historical match rows20 Spanish La Liga team names35 CSV columnsPYTHONPATH=. python3 predict_one.py1PYTHONPATH=. python3 predict_batch.py
2cat predictions_output.csvPYTHONPATH=. python3 smoke_test.py1PYTHONPATH=. python3 demo_cli.py \
2 --home-team 'Girona FC' \
3 --away-team 'Mallorca' \
4 --match-date '2026-05-01' \
5 --dataset-csv sample_history.csv \
6 --prettydemo_notebook.ipynb1from la_liga_score_predictor import LaLigaScorePredictor
2
3predictor = LaLigaScorePredictor.from_defaults(
4 dataset_csv_path="sample_history.csv"
5)
6
7result = predictor.predict_match(
8 home_team="Athletic",
9 away_team="Osasuna",
10 match_date="2026-04-21",
11)
12
13print(result["predicted_score"])
14print(result["result_probabilities"])
15print(result["confidence_level"])predict_match(...) for upcoming fixturespredict_match(...) will fail1simple_result = predictor.predict_match_simple(
2 home_team="Athletic",
3 away_team="Osasuna",
4 match_date="2026-04-21",
5)sample_history.csv with your own compatible historical match CSV:1from la_liga_score_predictor import LaLigaScorePredictor
2
3predictor = LaLigaScorePredictor.from_defaults(
4 dataset_csv_path="/path/to/your/history.csv"
5)
6
7result = predictor.predict_match(
8 home_team="Real Madrid",
9 away_team="Valencia",
10 match_date="2026-05-10",
11)1simple_result = predictor.predict_match_simple(
2 home_team="Real Madrid",
3 away_team="Valencia",
4 match_date="2026-05-10",
5)1from la_liga_score_predictor import LaLigaScorePredictor
2
3predictor = LaLigaScorePredictor.from_defaults()
4
5features = {
6 "home_avg_goals_last5_all": 1.4,
7 "away_avg_goals_last5_all": 1.1,
8 "home_avg_goals_last5_home": 1.6,
9 "away_avg_goals_last5_away": 1.0,
10 "home_avg_conceded_last5_all": 0.9,
11 "away_avg_conceded_last5_all": 1.2,
12 "home_avg_conceded_last5_home": 0.8,
13 "away_avg_conceded_last5_away": 1.3,
14 "home_win_rate_last10_all": 0.5,
15 "away_win_rate_last10_all": 0.4,
16 "home_win_rate_last10_home": 0.6,
17 "away_win_rate_last10_away": 0.3,
18 "home_draw_rate_last10": 0.2,
19 "away_draw_rate_last10": 0.3,
20 "home_goal_diff_last5": 2.0,
21 "away_goal_diff_last5": -1.0,
22 "home_rest_days": 6.0,
23 "away_rest_days": 5.0,
24 "home_elo_pre": 1715.0,
25 "away_elo_pre": 1662.0,
26 "elo_diff_pre": 53.0,
27 "home_team_id": 12.0,
28 "away_team_id": 19.0,
29 "home_player_minutes_total_prev5": 4050.0,
30 "away_player_minutes_total_prev5": 3970.0,
31 "home_player_goals_total_prev5": 6.0,
32 "away_player_goals_total_prev5": 4.0,
33 "home_player_assists_total_prev5": 4.0,
34 "away_player_assists_total_prev5": 3.0,
35 "home_player_yellow_cards_total_prev5": 8.0,
36 "away_player_yellow_cards_total_prev5": 10.0,
37 "home_player_red_cards_total_prev5": 0.0,
38 "away_player_red_cards_total_prev5": 0.0,
39 "home_player_starters_count_prev5": 55.0,
40 "away_player_starters_count_prev5": 55.0,
41 "home_player_used_count_prev5": 76.0,
42 "away_player_used_count_prev5": 73.0,
43 "home_player_injured_count_prev5": 1.0,
44 "away_player_injured_count_prev5": 2.0,
45 "home_player_suspended_count_prev5": 0.0,
46 "away_player_suspended_count_prev5": 1.0,
47 "home_tactic_id": 4.0,
48 "away_tactic_id": 7.0,
49 "home_coach_id": 1012.0,
50 "away_coach_id": 1048.0,
51 "home_tactic_stability_last5": 0.8,
52 "away_tactic_stability_last5": 0.4,
53 "tactic_matchup_code": 4007.0,
54}
55
56result = predictor.predict_features(features)
57print(result["predicted_score"])1simple_result = predictor.predict_features_simple(features)
2print(simple_result)predict_match()predict_match(home_team, away_team, match_date) to work, the predictor needs a compatible historical match CSV.datehome_teamaway_teamhome_goalsaway_goals1{
2 "predicted_score": "1-0",
3 "result_probabilities": {
4 "home_win": 0.46,
5 "draw": 0.31,
6 "away_win": 0.23
7 },
8 "confidence_level": "medium",
9 "confidence_score": 0.46,
10 "confidence_margin": 0.15,
11 "abstain_recommended": false
12}predicted_scoreresult_probabilitiesconfidence_levelabstain_recommendedpredicted_score_range when presentpredict_match_simple(...)predict_features_simple(...)expected_home_goalsexpected_away_goalsconfidence_scoreconfidence_marginraw_result_probabilitiesdecoder_diagnosticspredicted_score
predicted_home_goals
predicted_away_goals
result_probabilities
home_win, draw, and away_winraw_result_probabilities
expected_home_goals
expected_away_goals
confidence_level
high, medium, or lowconfidence_score
confidence_margin
abstain_recommended
true when the fixture is fragile enough that an exact-score claim should be treated cautiouslypredicted_score_range
decoder_diagnostics
top_outcome
top_outcome_probability
second_outcome_probability
draw_probability
xg_delta
expected_home_goals - expected_away_goalsclose_call_draw_override
true when a near-tied outcome distribution and small expected-goal gap push the decoder toward a drawoutcome_enforced
true when the outcome model is strong enough that the decoder forces the final score to match that directionspecialist_rule_triggered
true when an internal score-adjustment rule firesspecialist_rule_name
request
home_team, away_team, and match_date used in predict_match()predict_match("Athletic", "Osasuna", "2026-04-21")predict_match("Girona FC", "Real Betis", "2026-04-21")predict_match("Mallorca", "Valencia", "2026-04-21")la_liga_score_predictor2026.04.1MODEL_CARD.mdRELEASE_GUIDE.mdEVALUATION_SUMMARY.mdDATA_FORMAT.mdFAQ.mdQUICK_PUBLISH_CHECKLIST.mdCHANGELOG.mdARTIFACTS_SHA256.txt