Case study · Machine learning
NBA Insights: predicting games from data.
Can machine learning reliably predict NBA games using only past stats and context? A six-week build, from pulling raw game logs to a model that called 66% of the 2025-26 season’s games correctly, a season it never trained on.
- 66%of 2025-26 games called correctly, a season it never saw
- 74%in April, once teams have form history
- XGBoosttuned with GridSearchCV
- 6 weeksfrom raw data to a live app
| Home | Last 5 games | Away |
|---|
Choose a team on the right to see its rolling shooting, rebounding and turnover trends across the 2023–24 season.
How it works
From box scores to predictions.
- 01
Collect
Every 2023–24 regular-season game pulled with nba_api: points, plus-minus, home/away, results.
- 02
Engineer
Rolling 5-game form for each team and its opponent, win streaks, rest days and win rates.
- 03
Model
Logistic regression as the baseline, then XGBoost, tuned and tested on a season it never saw.
- 04
Ship
A predictor fed by daily NBA stats that runs in the browser, plus Tableau dashboards.
Build log
Follow the whole build.
Contact
Let’s build something data-driven together.
Let’s connect if you’re exploring AI-powered solutions or want to collaborate on data-driven innovation.