NFL PREDICTION MODEL
Weekly game forecasts with machine learning
Designed & Built by Sara Kola
·
Machine Learning Project
Order Summary
A machine learning model that predicts NFL games each week: win probability, point margin and total points for every matchup.
It is built independently of betting lines. Market spreads and totals are used only as a benchmark to test whether the model itself can compete with the market.
In Progress · Updated Weekly
Items — What I Built
- Python pipeline pulling NFL data with nflreadpy, processed with polars and pandas
- Logistic regression for win probability; Ridge regression for margin and total points
- Features: rolling EPA, rest, division games, home field, QB form, Elo and red zone rates
- Walk-forward backtesting with Platt calibration, so every season is tested only on past data
- Score error ranges (50% and 80%) for margin, total and each team's points
- Ablation tests on new features (turnovers, pass/rush splits, injuries), keeping only what improves log loss
- Weekly predictions exported to CSV and JSON, plus an HTML page with a per-game "what is influencing the prediction" breakdown
Receipt — Results
Pooled walk-forward log loss0.631
Pooled walk-forward AUC (11 features)0.695
Week 3 backtest, picks right (model)11 / 16
Week 3 backtest, picks right (market)9 / 16
Week 3 total points error (model vs market)10.1 vs 10.9
Week 3 margin error (model vs market)8.6 vs 8.1
Errors are mean absolute error in points. One week is a small sample; the model's margin error across the full walk-forward test was slightly behind the market's, and it is still being improved.
Built With
Python
nflreadpy
polars
pandas
scikit-learn
HTML / JS
What influences the prediction
N F L — 0 0 6 — S K
THANK YOU FOR SHOPPING
Return to portfolio for more receipts