Code Monkey home page Code Monkey logo

nba-analysis's Introduction

NBA Analysis

Overview

This is a project for NBA analysis built using the Kedro package.

Pipeline overview:

png

dp

This is a data processing pipeline to extract data from basketball reference.

Steps involved:

  • Get season data from basketball reference
    • Multiple seasons are collected with different nodes
  • Clean data and merge into single file

Todo:

  • Can we output a partitioned parquet dataset partitioned by season year?

shooting_per

This pipeline estimates the shooting percent of players and produces a plot of a random subset of players.

Steps involved:

  • Build bayesian model to get posterior distributions for player scoring %
    • Initially start with all players have uninformed beta distributions
    • This prior is taken from the parameters.yml
  • Take a random subset of players and plot into a single figure
    • The number of players to plot is from parameters.yml

Typical results:

jpeg

team_scores

TODO A model that describes each team's attack and defensive abilities.

Model on score differences. Fit with gradient descent in a sequential manner. Probably with pytorch. Use the fitted model to simulate future games scores.

Create docker image from our kedro project

kedro docker init
kedro docker build

Test run:

docker run nba-analysis

Convert to local tar file

docker save -o nba_analysis_docker.tar nba-analysis

Load on another machine

docker load -i nba_analysis_docker.tar

Todo

  • Converge with data sequentially
    • Give new posterior after each season
    • match by match
  • Hierarchical model which gives position based priors
  • Extend so that each player has a different ability per year
  • Build dashboard to explore different players
  • team_scores pipeline
  • Github CI/CD
  • Push project to google app engine on completion
  • unit tests
  • docs/mkdocs

nba-analysis's People

Contributors

stanton119 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.