Modeling the Pass

Over the course of the years, NBA Stats has released a variety of information about passing in games. A few years ago, we could directly query the “single-hop” passing network between players. It allowed me to then perform a topical analysis such as Kobe Bryant’s role within the Los Angeles Lakers’ offense. Unfortunately, little information existed in terms of temporal components, so that examples of secondary passes such as the ever-increasing-in-popularity “hockey assist” could not be computed. And as the turnover from SportVU to Second Spectrum took hold; the passing information vanished in favor of summary statistics such as number of passes. Despite this, we obtained hockey assist information, so not all was lost!

The question is then, how do we extract information about the passing network? Obviously, we don’t have the passing network anymore (unless it’s hidden, then someone link me sooner than possible!); but suppose we were crafty enough to obtain tracking data? For instance, suppose we supported our favorite Division III NCAA team and strapped Go-Pro cameras to the roof and performed basic convolutional neural networks to find players. Well, then how do we extract out passing information?

In this article, we summarize a methodology for grabbing passing attempts and identify why simple filtering is a massive problem.

Rule-Based Modeling the Pass in Tracking Data

Before we can perform any analysis on passing, we must first model the pass in tracking data. A pass can be performed in one of many ways. The four most common passes are the chest pass, the bounce pass, the lob pass, and the handoff. Think of these four components as straight angle, angle up, angle down, and no distance. There are other variants that exist, but these are the four we maintain our focus on.

One easy method to track passes is to mark passes in a game and then use the passes as training data to build a supervised learning model. I find this methodology may be overkill for something simple as marking passes. Instead, let’s just apply a notch filter, which is a rule-based method for eliminating certain elements of the game. In this case, the passes themselves.

So let’s walk down what will seem like completely obvious rules. As we introduce rules, we will discuss how the rule translates into a filter and some of the issues that arise with such a filter.

Rule 1: Completed Passes result in Possession

Rule one is that all completed passes must be between two teammates and within the same possession. This means that the ball has to be with one player for a period of time and then transfer to another player on the same team for a separate period of time. This indicates a transaction has occurred between the two players.

To apply this rule, we first identify possessions for each team. Within this period, we know that the offense has the ball. Therefore, second, we can merely look at the touches between players. A touch is just defined as the period of time a player maintains control of the ball.

Therefore, all we need to do in the code is maintain the state of the ball being touched while the ball is moving within possession. Building a class variable may be helpful in this capacity; where whenever a pass is impossible, the state of the class is flushed.

Example: Consider a point guard that brings the ball up court. They will be listed as the touching player until the make a pass to the wing. When the ball leaves the player, possibly by a certain threshold, the player state may be blank. When the receiver catches the ball, the player state of the ball has changed to a new player. This is a pass.

Example: Now when the receiver catches the ball, suppose they shoot. The ball leaves their possession and changes the player state of the ball to blank. This looks like a pass as well. However, the ball travels to the rim and misses; landing back in a teammate’s hands. We see the state change once again; but the action of field goal attempt has occurred. Therefore, we flush the previous state and update it with the rebounder. This is not a pass.

Rule 1 Issues: Deflections, Loose Balls, Dead Balls, and Box Outs…

The issue with touch-based passing is that while we do indeed grab every completed single pass; we gain a lot of false positives. These situations are deflections; which are “passes” that are unintended to be made to a player but occurs because the ball was deflected. Think of a tipped entry pass into the post that gets batted to another player in the short-corner.

Similarly, loose balls cause problems as suppose a point guard loses their handle and a teammate grabs the ball. This is not a pass as passes are intended. This is difficult to gauge, especially in the following example:

Example: Suppose a wing throws an alley-oop to a cutting post player. However, the pass is misguided and ricochets off the rim to a different teammate. Is this a pass? Ideally, this is an incomplete pass that results in a loose ball; recovered by the teammate.

Therefore, we count these as incomplete passes. We will encounter these in the next rule.

Also, dead balls pose problems as the clocks does not always stop when there is a dead ball. For instance, a made field goal does not always stop the clock in the NBA. Hence the simple act of flipping the ball out of bounds to a teammate to be thrown back in may register as a pass. We will treat this issue later.

Finally, an artifact of the camera system, box outs look like passes in some occasions. If a field goal attempt is taken, the ball may travel over a teammate in a low-enough fashion to look like a lob pass. Therefore, we really need to track the field goal file to notch these out.

Rule 2: Incomplete Passes Result in Turnovers, Dead Balls, or Loose Balls

Another simple rule is that passes that are incomplete must either be turnovers, dead balls, or loose balls. For the turnover cases, these are passes that are intercepted by opposing defensive players or passes that exit the court. Either way, the result of the pass leads to termination of possession. Therefore, we can use the possession ending frame to signal an incomplete pass. These are still passes.

For incomplete passes that do not result in turnovers, we know that the offense has retained possession. Therefore, the ball must have been deflected out of bounds or the ball was loose and a “scramble” ensued. In this case, we look for specific information such as change of direction with a non-teammate touch.

We identify the last part of non-teammate touch. This is vital. A deflection cannot occur unless an opponent is there to deflect the ball. Similarly, a ball cannot ricochet off the rim without a rim. Neither an opposing player, nor the rim, are teammates of the passer.

Rule 2 Issues: Strips, Pokes, and Magic Bullets

These are two extremely difficult areas to filter out. A strip or poke requires a defensive player to rip the ball from an offensive player. In this case, we have a loose ball. Therefore the state of the ball should be loose. However, using tracking data like we have for Second Spectrum or SportVU, we no longer have directionality of player. Therefore, we don’t know if an offensive player is facing, is sideways, or has their back to the defensive player. We can estimate it by where the ball is measured, but it will not be known exactly.

In these situations, strips may occur and they may look like passes. Pokes are worse as the offensive player may have a back to the defender and the ball is poked directly to an offensive teammate. It will look exactly like a pass and end up in the teammate’s hands. However, it is a loose ball.

As a side note, Second Spectrum has tried cleaning these up as some pokes have been registered in the past as passes in the past. One such way to clean up deflections is to leverage the loose ball and deflections counting stats. While the time-stamps may not line up perfectly, they give extra information into game state; allowing us to sever touch-to-touch state of the ball. Leveraging this data will also reduce Magic Bullets.

Magic Bullets are passes that seemingly defy physics. For instance, a player may put so much backspin on the ball, it takes a hard sharp turn to reach a teammate. In the same vein, as tracking technology cannot measure the spin of the basketball, deflected passes may look the same in x,y-space.

More Rules?

In total, using the touch-to-touch attack with notching based on possessions, loose balls, and deflections, we are able to account for over 99% of passes in the league with a false positive rate at about 2-3% . The bulk of the false positives are transition of possession cases. Remember the issue raised in rule one? These are those instances.

Transition of possession cases are situations where a possession changes hands between teams. Turnovers are obvious. Dead ball turnovers are obvious. Made field goals are not obvious. In some cases, three seconds have run off the clock as a team takes a ball after a made field goal and tosses it to a teammate underneath the hoop. This gets marked as a pass as the touch-to-touch is satisfied, the new possession has technically started despite the shot clock not, and the game clock is still running.

To deal with this is actually relatively simple. We see the ball get passed from in-bounds to out-of-bounds. Since no turnover is noted in the play-by-play, we are obviously taking the ball out of bounds.

As other intricate nuances of passing arise, we can include other simple filters. However, these two rules and a couple bashes against play-by-play captures almost every pass with excessively few false positives.

So let’s see this in action.

Passing in Animation

Let’s apply the above rules in terms of tracking data from the Pacers-Cavaliers opening round game from two seasons ago. In this case, Myles Turner knocks down an elbow jumper to transfer possession to the Cavaliers. Kevin Love takes out the ball and passes it back in to Kyrie Irving, who dribbles up the court.

Love gives a pin down to LeBron James, who received the pass at the high elbow. J.R. Smith comes across the lane for a pin-down from Love, mimicking a lift action to the wing. C.J. Miles goes under the screen, allowing Smith to curl as a reaction.

Thaddeus Young, defending Love, steps up to deny the curl, allowing Love to react and slip for the easy lay-up. James makes the pass to the interior. Unfortunately, the layup was not easy as Myles Turner rotates from the opposite elbow to help introduce the field goal attempt to the front row .

As we can see from the video, the exact play described breaks out. As we identify where a player obtains the basketball, a blue line appears. This line merely indicates the split for recording which direction a player will move. This also signifies when a touch starts. As the passes are made, we see a faint PASS blurt at the top of the screen. That’s the filter in action!

Many Passes!

Now that we know we can extract passes, we can start looking at the distribution of passes. For instance, we can look at the locations of passes being made and the locations of passes being received. We can also build out the passing network when we introduce the labels of the players.

Now, unlike field goal attempts, passes can be made all over the court, in different directions, during the same possession. For field goal attempts, there is one fixed location to shoot to; and players do not (intentionally) shoot at the wrong hoop. For passes however, passes can go forwards and backwards. They often do happen in the back court. Therefore, we should always specify direction of play when dissecting passes. The simplest solution? Make direction of player go left. Therefore all back-court passes are on the right hand side and all front-court passes occur on the left-hand side.

When performing this simple transformation, we obtain the following plot:

Yn-bkK3T

Distribution of passes from ONE Los Angeles Clippers game in 2016.

Here, the black dots represent the passer’s location when they released the basketball and the blue dots represent the receiver’s location when they received the basketball. Using the left-to-right transformation, we see the flow of the game from back-court to front-court. We also see a significant set of rebounds at the opponent’s hoop!

So let’s apply some analysis to see what sorts of things this mess of a plot is telling us.

Passing Trends

Let’s piggy-back off of a recent post about shooting trends in the NBA and perform the same analysis on passes. By performing a non-negative matrix factorization on the pass origination locations, this gives insight for the trends in where passes originate.

Again we break this down in 10 types of passes, and will quickly jump through them.

Type 0: Initialization passes

The most common half-court pass is the initialization pass. These are passes that come from the Pistol sequence to initiate an offense.  These are also passes where the point guard tends to dribble to one wing or the other before initializing the offense. This is the primary reason for the band about the three point line.

Screen Shot 2018-11-29 at 4.32.14 PM

Type 1: Second Pass

These passes tend to be the “second pass” part of an offense. While it is not always the second pass, these are passes that are typically initiated by a wing player.

Screen Shot 2018-11-29 at 4.32.03 PM

 

Type 2: Top of the Key Passing

The players with coefficients in this location for passing actually are post players that have rotated out to the top of the key. We see several point guards with these coefficients, but they are rarely as large as say Al Horford’s coefficient.

Screen Shot 2018-11-29 at 4.31.46 PM

 

Type 3: Interior Passing

The fourth most apparent pass is the interior pass. These are the drive-and-kick guards and the “extra pass” passers that find themselves tangled up in traffic. Screen Shot 2018-11-29 at 4.31.33 PM

Type 4: Catch-and-Shoot Wing Passers

Passers in these locations are actually right-dominat offensive players. If this were last year, Evan Fournier would be found as the king of this pass type as over 70% of Fournier plays last year resulted in him catching a pass on the right wing (extended), only to make another pass, typically into the post or to the top of the key.

Screen Shot 2018-11-29 at 4.31.18 PM

Type 5: Roaming Guard

Another top of the key pass-type, this is the roaming guard. As opposed to the Al Horford-type passers at the top of the key, these are the guards that handle the ball typically on odd-set offenses such as all-out or 3-2.

Screen Shot 2018-11-29 at 4.31.02 PM

Type 6: Extended High

We are seeing repetitive passing structures; and as you can guess, passes are primarily performed by guards and wings that play above the free-throw line. These are the off-ball guards and wings for the most part.

Screen Shot 2018-11-29 at 4.30.47 PM

Type 7: High Post and Wing

These passes are typically generated by wings and posts that have rotated out to the high elbow. Nikola Vucevic is actually a big name in this category. So is Kelly Olynyk. The streaks are wing players (that also play 4/5 positions) that tend to drive. These players are Giannis Antetokounmpo, and strangely not a post… Klay Thompson.

Screen Shot 2018-11-29 at 4.30.31 PM

Type 8: Mid-Range Passes

Here, we obtain mid-range passing. Remember that these are passes and not shots. These passes are all over the place. They are kick-outs from drives (to the top of the key). They are skip passes. There’s even Hammer passes sneaking in there.

Screen Shot 2018-11-29 at 4.30.16 PM

Type 9: High Post

Finally we have the pure high post player passes. These are for post players that rarely move beyond the three point line. Here we find players such as Clint Capela.

Screen Shot 2018-11-29 at 4.30.01 PM

Curious Take-Away

One thing we learn about the different trends in passes are the areas where passes are not made. For instance, the left three-point wing does not have a significant spike in any plot. This indicates that most players drive or shoot from this location.

A semi-satisfying result is that directly under the basket is relatively small compared to every location around the restricted area (including behind the basket!), indicating the same phenomenon.

Regardless, by looking specifically at the players’ coefficients, we are able to start to understand the players’ decision making processes of how likely they are to make passes.

6 thoughts on “Modeling the Pass

  1. I really like your stuff , how do you get the spatial data and what program do you use to manipulate and animate the findings, R, Python ? Last one , can you do it for World football (soccer ) Thanks and Go Kings

    Like

    • Thanks for the response, Förtir! My data came from an agreement with a team from the past. I use Python for almost everything. I think for soccer, Statsbomb gives out data for tracking. Not 100% sure. Check him out on Twitter. #SacramentoProud

      Like

  2. Pingback: Modeling the Pass — by Justin Jacobs – Advance Pro Basketball

  3. Pingback: Weekly Sports Analytics News Roundup - December 4th, 2018 - StatSheetStuffer

  4. Pingback: The Potential Assist | Squared Statistics: Understanding Basketball Analytics

  5. Pingback: The Action Network | Squared Statistics: Understanding Basketball Analytics

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.