Git Product home page Git Product logo

nba-forecasting's Introduction

NBA-Forecasting

Background

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 $X_1, X_2, ...., X_N$ where $X_j$ is a $k$ dimensional vector of points, rebounds, and other statistics that measure performance over the course of a season. My goal is sequence prediction - given observations $X_1, ..., X_p$ I want to predict $X_{p+1}, ..., X_N$ to determine how a career changes over time. The vector prediction nature of the problem lends itself to recurrent neural networks.

Setup

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.shin a terminal shell.

The repo is set up as a python package, to make imports between modules easier.

Running

To make forecasts (after installing), run

conda activate nba_forecasting && streamlit run app.py

The application should look something like this:

alt text alt text

Historical Validation

For information on validation of the model, including performance comparison against a baseline model, look here.

Future Steps

Future work here should:

  1. Better tune hyperparameters
  2. Calibrate confidence intervals

nba-forecasting's People

Contributors

jgwaugh avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.