About
History
Originally built as a 2019 BYU class project. The web app is Django and the prediction backend was Azure ML Studio (classic), retired by Microsoft on August 31, 2024.
Rebuilt in 2026 with two scikit-learn models trained locally, a Next.js frontend, and Python serverless functions on Vercel. The original repo is archived at github.com/matthewtannyhill/nbashots.
Models
Shot model: Random Forest classifier trained on the Kaggle NBA Shot Logs 2014-15 dataset (128k shots). Features: shot clock, touch time, shot distance, closest defender distance, dribbles. Test AUC 0.634, accuracy 61.9%. Roughly the published ceiling on this feature set.
Salary model: Random Forest regressor trained on a join of Basketball-Reference season stats and NBA salaries (1990-2017, 12.7k player-seasons). Predicts log(Salary) from age, games, minutes, and win share components. Median absolute error ~$940k. Salaries are not adjusted for salary-cap inflation.
Honest caveats
- Shot model predicts "miss" more often than "make" because misses are ~54% of training data.
- Salary model treats 1995 dollars and 2017 dollars the same, which they aren't.
- Neither model captures defensive scheme, fatigue, contract year, or team budget.