MENU

Fun & Interesting

Predict NBA Games With Python And Machine Learning

Dataquest 56,359 lượt xem 2 years ago
Video Not Working? Fix It Now

We'll predict the winners of basketball games in the NBA using python. We'll start by reading in box score data that we scraped in the last video. If you didn't watch the last video, you can still download the file (link below) and follow along.

We'll do feature selection to identify good predictors, and train a machine learning model to make predictions. We'll end by computing rolling predictors and improving the model. We'll discuss how you can keep improving the model and predict future games.

Links

Full code and description of the project - https://github.com/dataquestio/project-walkthroughs/tree/master/nba_games

Dataset if you missed the previous video - https://drive.google.com/uc?export=download&id=1YyNpERG0jqPlpxZvvELaNcMHTiKVpfWe

Previous video where we did web scraping - https://youtu.be/o6Ih934hADU

Chapters

00:00 Introduction
01:00 Reading in box score data
06:10 Preparing data for machine learning
16:10 Selecting the best features for the model
25:31 Creating a baseline model
36:06 Improving performance with rolling averages
41:54 Add in opponent information
51:11 Train a more accurate model
55:08 Improving the model and making future predictions

---------------------------------
Join 1M+ Dataquest learners today!
Master data skills and change your life.
Sign up for free: https://bit.ly/3O8MDef

Comment