Skip to content

🔮 Predicting NBA games using statistics (65% accuracy so far)

Notifications You must be signed in to change notification settings

sidharthrajaram/CrystalBall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cover

Crystalball is a statistical method of predicting outcomes of NBA games. Accuracy has varied from 64% to 68% over the last couple of years that it has been operational. Feel free to predict NBA games using the simple script as outlined below.

Notes for the 2020-2021 Season:

No home or away dis/advantages due to no in-person attendance at games (COVID-19)

predict_game.py is the new and improved version of the game outcome predictor.

To run: python3 predict_game.py <home_year> <home_team_id> <away_year> <away_team_id>
For example: python3 predict_game.py 2021 MEM 2021 ATL
sim.py contains the primary methods for simulating games
utils.py contains methods for cleaning / parsing player data

Total Results

Total Games Games Predicted Correctly Accuracy
23 15 65.2%

Update: I stopped writing up the daily predictions in the readme, but let me know if that's something you want to see.

12.29.20 Forecast

"Home" "Away" Predicted Winner + % Prediction Timestamp Real Winner Notes
CLE NYK CLE 100.0% 12/29/2020 16:18 NYK xx
PHI TOR PHI 100.0% 12/29/2020 16:18 PHI xx
DET GSW DET 100.0% 12/29/2020 16:18 GSW xx
IND BOS IND 100.0% 12/29/2020 16:18 BOS xx
WAS CHI WAS 100.0% 12/29/2020 16:18 CHI xx
MIA MIL MIA 100.0% 12/29/2020 16:18 MIL xx
OKC ORL ORL 88.36% 12/29/2020 16:18 ORL xx
PHO NOP PHO 100.0% 12/29/2020 16:18 PHO xx
SAC DEN SAC 98.96% 12/29/2020 16:18 SAC xx
LAC MIN LAC 59.49% 12/29/2020 16:18 LAC xx

12.26.20 Forecast

"Home" "Away" Predicted Winner + % Prediction Timestamp Real Winner Notes
MEM ATL ATL 100.0% 12/26/2020 14:02 ATL xx
DET CLE CLE 100.0% 12/26/2020 14:02 CLE xx
WAS ORL ORL 100.0% 12/26/2020 14:02 ORL xx
CHO OKC xx xx xx No data on OKC yet
NYK PHI PHI 100.0% 12/26/2020 14:02 PHI xx
CHI IND IND 100.0% 12/26/2020 14:02 IND xx
SAS TOR SAS 100.0% 12/26/2020 14:02 SAS xx
UTA MIN UTA 100.0% 12/26/2020 14:02 MIN xx
SAC PHO SAC 98.945% 12/26/2020 14:02 SAC xx
POR HOU xx xx xx No data on HOU yet

12.25.20 Forecast

"Home" "Away" Predicted Winner + % Prediction Timestamp Real Winner Notes
MIA NOP NOP 100.0% 12/24/2020 18:43 MIA xx
MIL GSW MIL 100.0% 12/24/2020 18:43 MIL xx
BOS BRK BRK 100.0% 12/24/2020 18:43 BRK xx
LAL DAL DAL 53.397% 12/24/2020 19:04 LAL xx
DEN LAC LAC 78.898% 12/24/2020 18:43 LAC xx

About

🔮 Predicting NBA games using statistics (65% accuracy so far)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages