This notebook contains an analysis of latent skills of NBA players when involved in a play where a foul was or might have been called. The analysis is performed with a Bayesian Item Response Rasch model with hierarchical structure. The software used is PyMC3. This notebook is based on Austin Rochford blog post NBA Foul Calls and Bayesian Item Response Theory. This notebook is also available within the official PyMC3 examples here.
The easiest way is to simply click on this binder link
Alternatively, you can set up the repo locally using Anaconda following the simple four steps.
In your terminal, use git
to clone the repository locally.
git clone https://github.com/ltoniazzi/Item-Response-NBA.git
Download the Anaconda distribution of Python 3.
If this is the first time you're setting up your compute environment,
use the conda
package manager
to install all the necessary packages
from the provided environment.yml
file.
conda env create -f environment.yml
To activate the environment, use the conda activate
command.
conda activate Item-Response-NBA
If you get an error activating the environment, use the older source activate
command.
source activate Item-Response-NBA
To update the environment based on the environment.yml
specification file, use the conda update
command.
conda env update -f environment.yml
In the terminal, execute jupyter lab
.