Code Monkey home page Code Monkey logo

nba-win-prob-model's Introduction

nba-win-prob-model

Machine learning model to predict single game win probability for home team in NBA game

Cloning the environment

Use the provided environment.yml file to clone the project environment

Usage

To predict the home team win probability for a given NBA game, activate the cloned environment and run:

python single_game_prediction.py home_team away_team game_date boxscores_csv_path season_summaries_csv_path

WARNING: In the current state of the script, predictions can only be made on games between the start of the 1985 season and March 6th, 2018 if using the provided CSVs (nba_boxscores_1984_2018.csv and nba_season_summaries_1984_2018.csv)

Arguments:

  • home_team - 3 letter abbreviation for home team (basketball-reference boxscore initials)
  • away_team - 3 letter abbreviation for away team (basketball-reference boxscore initials)
  • game_date - the date of the game to predict (format=YYYY-MM-DD)
  • (optional) boxscores_csv_path: string, path to boxscores csv, see nba_boxscores_1984_2018.csv for format
  • (optional) season_summaries_csv_path: string, path to season summaries csv, see nba_season_summaries_1984_2018.csv for format

WARNING: if boxscores_csv_path or season_summaries_csv_path are not provided, the script will attempt to scrape the needed data. This requires an internet connection and will take time. THIS FEATURE IS CURRENTLY UNTESTED AND MAY NOT FUNCTION PROPERLY!

Example

python single_game_prediction.py MIA CHO 2016-10-28 ../Data/nba_boxscores_1984_2018.csv ../Data/nba_season_summaries_1984_2018.csv

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.