Nicholas Khorasani

Computer Engineer | Software Engineer

NBA Game Outcome Predictor

February – March 2024

TLDR

  • Programmed a multi-threaded web scraper with Python and BeautifulSoup to collect 30+ years of NBA data.
  • Cleaned and normalized a dataset of 6,253 games with 200+ features per game using pandas.
  • Trained GPU-accelerated neural networks in PyTorch to predict game outcomes with over 70% accuracy.

Project Overview

In this project, I trained neural networks using PyTorch to predict the outcome of NBA games. I scraped and processed 20 years of historical game data from basketball-reference.com, transforming raw stats into structured datasets suitable for machine learning.

My models reached around 70% accuracy, but surprisingly, this was comparable to simply picking the team with the higher season win percentage. This highlighted how much signal is already embedded in that one stat — and how hard it is to outperform strong heuristics without more detailed features.

Code

💻 GitHub Repository

What I Learned

  1. Building scalable scraping pipelines and managing large datasets are just as important as the modeling step.
  2. Strong baselines (like win percentage) are often hard to beat — especially without player-level context.
  3. The next step would be incorporating player rosters and availability into the model to make predictions more precise.

Contributions and Acknowledgements

Project by Nicky Khorasani and Eli Propp. We worked together on data collection, model design, and training strategy.