Data Science: The science of moving dots in Basketball and shot value
By: Haider Hussain
Tags: Basketball, Data Science, Sports, Spatial Analysis, Machine Learning

By representing players as dots and keeping track of their movement, data science methods can now study player behavior and provide insight to coaches/teams executives on better game planning and what plays to execute down the stretch for the highest success rate. Statistics have always been utilized in sports but how accurately are basic statistics measuring a players behavior? Are they an accurate measurement of what coaches and sports analyst have a ‘feel’ for? Having a ‘feel’ for the game and using the eye test is an important skill that coaches and experts have but how can you quantify this qualitative ‘feel’? For example in basketball, an average fan can tell when a player is taking a bad shot because it was heavily contested or there was a higher percentage shot available that another teammate could have taken, but how do you measure that? Companies like Second Spectrum are teaming with various NBA teams and use machine learning and spatio-temporal pattern recognition to help answer these questions. A simple description/illustration of how this information is captured through the STATS SportVU system :

‘STATS SportVU utilizes a six-camera system installed in basketball arenas to track the real-time positions of players and the ball 25 times per second. Utilizing this tracking data, STATS is able to create a wealth of innovative statistics based on speed, distance, player separation and ball possession.’

By utilizing these tools every single movement a player makes at every second can be captured as data. The machine learning model then uses this data/movement to learn a players behavior. The machine can learn to recognize important terminology such as what consists of a pass, a rebound, a shot. Even advanced plays such as pick/rolls, post-ups and down screen can be identified. What is even more amazing is that as more information is gathered the machines are learning and more accurate with time. In simpler terms what the machine learning model is doing is sorting what is a shot and what isn’t a shot or what is a pick and roll and what isn’t a pick and roll. It gathers information by classifying and identifying many variations of a play. Ultimately the machines can then identify when these plays were the most effective by identifying when and what type of play led to to success (i.e. points).

Here are some visuals of what the machine learning model is capturing by the second:

Machine learning and spatio temporal recognition can identify terminology such as rebounding

Machine learning and passing example

Machine learning postup example

Machine learning identifying a pick and roll

Machine learning and making a shot

Coaching staff and teams can then utilize this information to start identifying things such as which players return the highest success rate after utilizing a pick and roll. Which combination players are the most effective when the game is on the line? Which plays increase opportunities to score when the team needs it the most?

Highest Shot Value

A more specific application of this technology is shot value. Currently the most common and widely accepted method of establishing whether or not a player is a good shot maker is their effective field goal percentage (EFG%). It is simply a ratio of the shots made over the shots taken. Because 3 pointers are worth more EFG also weighs 3 pointers more heavily. Simply put EFG captures the ability to make a shot but it does not quantify the quality of the shot. Am I getting my best shooters the best shots available to yield the highest success? How much do factors like was the shot contested or how close was the defender to the shooter matter? How can I capture ability and quality of a shot and create a better ?

Some of the more important features second spectrum uses to define effective shot quality (ESQ) are defender distance to shooter and catch&shoot vs. off the dribble shot. They then enhance the EFG metric by factoring in ESQ to truly measure shooting value. Some other features second spectrum includes to determine shot quality are shot distance, shot angle, defender distance, defender angle, player speed and player velocity angle.

Visual of EFG:

Effective Field Goal percentage shot

Above is an illustration of the chances of an average NBA player making the shot from various distances. The closer you are to the basket the higher the chances are. Shooting from outside of the 22 feet line returns higher points (3 points). Besides EFG (shooting ability) there are other factors that effect shot value.

Components of Shot Quality: Defender distance and Catch&Shoot shot vs. Off the Dribble shot