I'm curious about this part:
The NBA has developed complex algorithms to estimate who is guarding whom at any given moment of every single possession of every single game, which helps us appreciate players like Smart in ways that go far beyond his 1.7 steals per game.
For example, back on March 3 when the Celtics beat the Memphis Grizzlies despite not having Jaylen Brown, Smart defended Ja Morant on 27 partial possessions. In those trips down the floor, Morant -- who ranks seventh in the NBA averaging 27.6 points -- managed to take just three shots.
Does anybody know -- in very broad terms -- how this works? I understand visual tracking of players. How would an algorithm be able to do this?
Just remember, I'm not a mathematician or computer scientist.
An algorithm is just a set of rules that tells a computer how to do something.
To start with an easier example: on NBA Shot Dashboard:
https://www.nba.com/stats/players/shots-closest-defender/The 'closest defender distance' filter goes from 0-2 feet, 2-4 feet, 4-6 feet, and 6ft+. The dataset is being returned based on the (digital) tape evaluation - I am 99.5% positive they're not doing this estimation by hand.
So, very simply, you say "computer, tell me how close Jayson Tatum's defenders are when he shoots the ball"?
Once you teach the computer how to tell who Tatum is, what constitutes a shot, how to tell an opponent from a teammate etc., there are loads of ways you can determine distance from a video feed, especially if you have consistent measurements (e.g. players' listed heights). It's a lot of maths, but computers are built to do that. Literally.
So for this defending player algo, we can assume it's following some logic that is (I won't type out any code because my code is trash and it'd be much more annoying) is something like:
When *team* is on defense/not in possession of the basketball, record each *team*'s player that is most adjacent to *other-team's* player for the duration of the offensive possession.
Safe to assume 'partial possession' has to do with an action that lead to a switch, so Smart started off on Morant but wasn't guarding him at the end of it.
There's going to be a lot more to it, as C's2021 suggests, because you have to be pretty explicit (hence the complexity of the algo), but you
could do it by hand for a given player over a given game if you wanted to.