NBA Spread Prediction Model

A multi-model NBA spread analysis pipeline that combines statistical edge models with a GPT synthesis layer to generate per-game betting recommendations

Technology Stack
Python
Scikit-Learn
Logistic Regression
GPT-4.1-mini
Neon PostgreSQL
NBA API
Tkinter

Project Overview

This project is an end-to-end NBA betting decision-support system. It fuses quantitative modeling with a large-language-model synthesis layer: statistical models compute projected margins and cover probabilities, and GPT-4.1-mini reasons over those signals to produce a final pick, confidence score, and risk flags for each game.

Key Features

  • • Multi-model statistical edge engine combining four versions of the model, including L1 and L2 logistic regression, to compute projected margins, fair spreads, cover probabilities, and per-game expected value
  • • GPT-4.1-mini synthesis layer with a structured system prompt and enforced JSON schema output, fed the quantitative signals to generate a final pick, confidence score, and risk flags
  • • Historical game data pulled from a Neon PostgreSQL database and live odds from the NBA API
  • • Tkinter GUI with live and demo prediction modes, progress tracking, and result export

Technical Approach

  • • End-to-end pipeline from data ingestion through modeling to final recommendation output
  • • L1 and L2 regularized logistic regression for edge estimation across multiple model versions
  • • Enforced JSON schema on the LLM output for reliable, machine-readable predictions
  • • Confidence scoring and risk flagging to communicate uncertainty on every pick

Results & Insights

Performance

Due to time constraints we were unable to test the model intensively. However, for a set of 11 NBA playoff games the model produced 7 correct picks.

Development Insights

This was my Computer Science capstone project along with 3 other classmates. We all enjoyed sports, machine learning, and AI so we decided to combine all of those interests into a single project. This project was a great opportunity to learn about an entire machine learning and AI pipeline, from data ingestion and cleaning, to model training and evaluation, to deployment and user interface design.

4

Statistical Models Combined

L1 & L2

Logistic Regression