Skip to content

aviskarkc10/nba-expected-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nba-expected-bucket

Predicting the outcome of shots based on the events and tracking data available for the 2015/16 season.

Quick links:

Data

The repo combines events data and tracking data from the 2015/16 season.

Data Source:

Features used in the model

Categorical Features

SHOT_TYPE SHOT_ZONE_BASIC SHOT_ZONE_AREA SHOT_ZONE_RANGE ACTION_TYPE_SIMPLIFIED
2PT Mid-Range Right Side Center(RC) 16-24 ft. Layup
3 PT Above the Break 3 Right Side(R) 24+ ft. Dunk
Restricted Area Center(C) 8-16 ft. Hook Shot
In The Paint (Non-RA) Left Side(L) Less Than 8 ft. Jump Shot
Left Corner 3 Left Side Center(LC)
Right Corner 3

Numerical Features

AVERAGE_DEFENDER_DISTANCE SHOOTER_DEFENDER_DISTANCE OFFENSE_SPACING DEFENSE_SPACING SHOT_CLOCK

Calculating Spacing

I used convex hull technique to calculate the OFFENSE_SPACING and DEFENSE_SPACING. This is explained much better here: http://projects.rajivshah.com/sportvu/Chull_NBA_SportVu.html

AVERAGE_DEFENDER_DISTANCE and SHOOTER_DEFENDER_DISTANCE are calculated using the distance formula.

Where do teams take their shots from?

Hex bin of shots

Does better spacing result in higher shooting percentage?

From the charts below we can infer that, although that is not the case always, we do see that among the teams with shooting percentage higher than the league average, the spacing also is better and vice versa

average defense spacing vs field goal percentage average offense spacing vs field goal percentage

average defense spacing vs two point percentage average offense spacing vs two point percentage

average defense spacing vs three point percentage average offense spacing vs three point percentage

Shooting % based on zones?

Shooting percentage based on zones

Points per shot based on zones?

Points per shot based on zones

Performance of ML Models

Decision Tree

images/Decision tree shooting percentage based on zones

images/Decision tree points per shot based on zones

Random Forest

images/Random Forest shooting percentage based on zones

images/Random Forest points per shot based on zones

LICENCE

MIT

About

Predicting the outcome of shots based on the events and tracking data available for the 2015/16 season.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published