← Projects

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
Live · 2026-27 form, updated daily Pick any two teams. The model runs right here in your browser.
—–
Loading the model…
—–
HomeLast 5 gamesAway

How it works

From box scores to predictions.

  1. 01

    Collect

    Every 2023–24 regular-season game pulled with nba_api: points, plus-minus, home/away, results.

  2. 02

    Engineer

    Rolling 5-game form for each team and its opponent, win streaks, rest days and win rates.

  3. 03

    Model

    Logistic regression as the baseline, then XGBoost, tuned and tested on a season it never saw.

  4. 04

    Ship

    A predictor fed by daily NBA stats that runs in the browser, plus Tableau dashboards.

Build log

Follow the whole build.

Code on GitLab ↗

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.