Skip to content

Sarvesh30/NetGainNBA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetGainNBA

This project is a full-stack NBA playoff analytics and simulation tool which uncovers team and player playstyles and analyzes which archetypes are most important to a team's postseason success. It combines data collection, cleaning, clustering, deep learning, and monte carlo simulations to provide actionable roster construction strategies for front office management.


Demo

Click here to watch the demo video

ML Workflow

  1. Data Collection & Cleaning

    • Fetched team, player, and matchup data from the NBA API.
    • Joined and cleaned datasets to create structured inputs for modeling.
  2. Player & Team Clustering

    • Clustered players into playstyles using K-Means clustering.
    • Transformed player clusters into team-level playstyle proportions.
  3. Regression Modeling

    • Built Random Forest and XGBoost models to forecast the number of playoff wins for a team.
  4. Classification Modeling

    • Shifted to a classification approach using TabNet neural networks.
    • Used temporal sliding cross-validation to predict actual playoff matchups.
    • Achieved 88% playoff prediction accuracy (2020–2024).
  5. Simulation & Monte Carlo Analysis

    • Introduced controlled randomness via Monte Carlo simulations.
    • Predicted playoff winners and displayed round-by-round probabilities for each team.

Application Insight:

  • Front office management can analyze which playstyles are most impactful for playoff performance.
  • Users can simulate any playoff bracket and visualize the effect of different team archetypes.

Getting Started

To run this project (FOR NOW):

NOTE: NEED TO MAKE A .env FILE AND PUT ALL THE AUTHENTICATION KEYS FOR THIS TO WORK

  1. Navigate to the frontend folder:

    cd frontend
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run dev
    

Backend Setup

To set up the backend environment (you can skip directly to the pip install stuff if you don't want to set up a virtual enviorment):

macOS

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

    python3 -m venv .venv
  3. Activate the virtual environment:

    source .venv/bin/activate
  4. Install the required dependencies:

    pip install Flask Flask-CORS pandas
  5. Run the backend server:

    python main.py

Windows

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

    python -m venv .venv
  3. Activate the virtual environment:

    .venv\Scripts\activate
  4. Install the required dependencies:

    pip install Flask Flask-CORS pandas
  5. Run the backend server:

    python main.py

About

AIM S25 NetGainNBA Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors