Motivation & Objective

This project aims at creating a visualization tool for basketball games, incorporating the Shot Success Probability at any time - probability of success if the current ball carrier takes a shot. This tool is a first step towards an in-game-decision analysis tool as it can be used to assess the relevance of the choice between making a pass and taking a shot: is the shot success probability higher before of after the pass? The data used is described below, but more detailed datasets could allow for the construction of a more developed tool analysing the Expected Point Value of each possible action (pass, shoot, layup, drive, etc.).

Data

Two distinct datasets are used:

Approach

This project has two main components:

Shot Success Probability model

The Shot Success Probability model is a simple Logistic Regression based on the features available in the shot logs file. This file contains for each shot of the 2014-2015 season the distance from the ball carrier to the closest defender and to the basket, and a label informing if the shot was successful or not. Based on these features and using the trained model, it is possible to determine the Shot Success Probability of every shot in a game, as long as the distances between the ball carrier, the closest defender and the basket can be computed.

Application to Game Data and Visualization

From the game dataset containing the players' positions, it is easy to compute the distances from players to the ball and to determine who the ball carrier is. However, assigning the ball carrier flag to the player closest to the ball leads in errors when a pass goes by a defender, or a teammate who actually did not touch the ball. A trick here is to assign the ball-carrier flag based on multiple frames.

Then, it is easy to compute the distance from the ball carrier to the basket and to the closest defender, to flag passes, to apply the Shot Success Probability model, and to build a visualization for it.