MLB HR PyTorch Experiment

A live notebook-style post separating calibrated HR probability from ranking signals for shortlist discovery.

Updated 2026-06-18T03:40:34.374541+00:00
Baseline Brier
0.1017

mlb-hr-v1 / random_forest

Baseline AUC
0.6048

8,185 held-out batter games

Best Candidate
0.3535

mlb-hr-torch-v1_heuristic_blend / pytorch_heuristic_blend log loss

Data Expansion
0.6081

Statcast blend AUC

Experiment Thesis

The current random-forest HR model is calibrated and leakage-aware. A validation-chosen PyTorch + heuristic blend improves Brier and log loss, a handedness-enriched blend improves top-10 ranking, and a Statcast-enriched blend has the best AUC/top-25 ranking so far.

The current model is useful because it is leakage-aware and calibrated against a fixed held-out slice. The raw PyTorch model is comparable, but the stronger result is the validation-chosen PyTorch + heuristic blend, which improves probability metrics while preserving the same pregame feature rules. Handedness and Statcast enrichments improve ranking in different parts of the board, so the next production decision should keep probability quality and candidate ranking separate.

Statcast currently improves broad ranking, handedness improves top-10, v1 remains the calibrated production baseline.

pytorch_evaluated
candidate market
same split comparison
ranking experiment
handedness enriched
Before / After Metrics
MetricRandom ForestPyTorchBlendBlend Delta
Brier0.10170.10190.1015-0.0002 better
Log loss0.35480.35500.3535-0.0013 better
AUC0.60480.59660.6057+0.0009 better
Top 10 hit rate18.8%16.6%17.8%-0.0094 worse
Top 25 hit rate18.8%17.3%18.3%-0.0050 worse

Lower Brier/log loss and higher AUC/top-K hit rate are better.

Blend weights: 84.0% PyTorch / 16.0% heuristic. Blend weights are selected on the inner validation split, then scored once on the held-out test split.

Daily Outcome Loop
RowsBrierLog lossAUCTop 10Top 25
1100.16420.51580.559410.0%20.0%

Evaluated dates: 2026-06-16. Missing outcome rows: 10. This is live-board feedback for the currently served model, not the held-out training split.

Enrichment Lanes
SourceBrierLog lossAUCTop 10Top 25
Handedness
mlb-hr-torch-handed-v1_heuristic_blend
0.10160.35380.599821.3%18.6%
Statcast
mlb-hr-torch-statcast-v1_heuristic_blend
0.10160.35360.608118.8%19.9%

Handedness enrichment adds batter/pitcher platoon context from MLB Stats API player metadata. Statcast enrichment adds prior pitch-level contact quality and pitch-mix aggregates from Baseball Savant.

Data We Want Next
Baseball Savant Statcast CSV

Pitch-level pitch type, velocity, launch angle, exit velocity, batted-ball events, and outcomes.

pybaseball

Python access to Baseball Savant, FanGraphs, and Baseball Reference data for reproducible feature backfills.

MLB Stats API boxscores

Current repo source for schedules, probable pitchers, lineups, batter outcomes, and starter history.

Publish Gate
Probability and ranking objectives are reported separately.
Daily predictions are joined to completed-game outcomes.
Statcast and handedness features are rerun on the same held-out split.