This repo contains code from an independent project where I predict NBA player career using LSTM recurrent neural networks.
Code was revisited and cleaned in January 2023.
The basic idea is that a career is a time series of vectors
Modeling was done using python 3.7.15
and virtual
environments were managed using conda
.
Requirements are stored in requirements.txt
I found it easiest to install deps with both pip
(out of habit)
and conda
(to circumvent long tensforflow
compilation / builds from scratch)
.
To install deps and build the environment, run source install.sh
in a terminal shell.
The repo is set up as a python package, to make imports between modules easier.
To make forecasts (after installing), run
conda activate nba_forecasting && streamlit run app.py
The application should look something like this:
For information on validation of the model, including performance comparison against a baseline model, look here.
Future work here should:
- Better tune hyperparameters
- Calibrate confidence intervals