Jekyll2020-10-02T14:21:51+00:00http://www.intraocular.net/feed.xmlIntraocularData analysis that hits you in the eye!
Intraocular LLCintraocularstats@gmail.comHow Augmented APM Works2020-10-01T00:00:00+00:002020-10-01T00:00:00+00:00http://www.intraocular.net/2020/10/01/how-augmented-apm-works<!-- * TOC
{:toc}
-->
<p>Humans have an insatiable desire for ratings. Nowhere is this more clear than in sports.</p>
<p>In sports, there are many types of rating systems, but the two most common are:</p>
<ol>
<li><strong>Team Ratings</strong>: How good is each team?, and</li>
<li><strong>Player Ratings</strong>: How good is each player?</li>
</ol>
<p>This post is about <em>player ratings</em>. And in particular, it’s about our new player rating method, called <em>Augmented Adjusted Plus-Minus</em>. You’ll learn why plus-minus statistics are popular, why the standard adjusted plus-minus method breaks down in soccer, and how our method, <em>Augmented Adjusted Plus-Minus</em>, overcomes these issues.</p>
<p>Before jumping into Augmented Adjusted Plus-Minus, it’s important to understand it’s predecessors: <em>Plus-Minus</em> and <em>Adjusted Plus-Minus</em>. So let’s start there.</p>
<h2 id="what-are-plus-minus-statistics">What are plus-minus statistics?</h2>
<p>Plus-Minus measures the score differential for players when they’re on the field. For example, if Lionel Messi played 1,000 minutes, and in those 1000 minutes, Barcelona out-scored its opponents by 22 goals, then Messi’s plus-minus would be <span style="color:green">+22</span>.</p>
<p>Plus-minus statistics are nice because they <em>directly measure a player’s contribution to winning</em>. In contrast, other statistics only measure contribution to winning <em>indirectly</em>.</p>
<p>To understand this better, think about rebounds in basketball. When a player gets a rebound, it’s viewed as a positive statistic. But there’s no guarantee that this rebound <em>actually contributes</em> to winning. For example, the player could have gotten the rebound, then taken a step-back, fade-away three-pointer, which misses the basket by a mile, and leads to an easy slam-dunk for the other team. In this case, <em>the rebound actually lead to a negative outcome</em>. In contrast, plus-minus would have captured the negative outcome: <span style="color:red">-2</span> for the ill-fated player.</p>
<p>Although the situation described above is contrived and unlikely, the point is, plus-minus statistics are <em>directly tied to winning</em>. That’s a big reason why folks use plus-minus.</p>
<h3 id="issues-with-plus-minus">Issues with Plus-Minus</h3>
<p>But plus-minus statistics aren’t perfect. The main downside is that plus-minus doesn’t adjust for:</p>
<ol>
<li>Quality of teammates, and</li>
<li>Quality of opponents</li>
</ol>
<p>This means bad players on really good teams could have good plus-minus ratings, and vice versa.</p>
<p>How can you solve this? That’s where adjusted plus-minus comes in.</p>
<h2 id="how-adjusted-plus-minus-solves-these-issues">How adjusted plus-minus solves these issues</h2>
<p>Adjusted plus-minus improves on plus-minus by <em>adjusting for the quality of teammates and opponents</em>. How does adjusted plus-minus make these adjustments? <a href="https://en.wikipedia.org/wiki/Regression_analysis">Regression</a>!</p>
<p>At a high level, adjusted plus-minus runs a big regression on all segments. Each segment is a continuous time-period where the players on the field don’t change. Here’s an example of what the segments look like for a match between Manchester City and Liverpool:</p>
<p><img src="/assets/images/how-aug-apm-works/design-mat1-1.png" alt="" /></p>
<p>In this figure, the first row represents the first segment. The first segment starts at minute 0, and ends when the first substitution of the game happens, at minute 60. Since Aguero is on the home team, adjusted plus-minus marks him as a \(1\). Salah is marked as \(-1\) since he’s on the away team. And since Lukaku plays for Manchester United, a different team, he’s marked with a \(0\).</p>
<p>In the big regression, each player is a covariate, and the response variable is goal differential. From a technical perspective, adjusted plus-minus <em>adjusts for teammates and opponents</em> because teammates and opponents are covariates in the regression.</p>
<p>By now you can see why adjusted plus-minus is popular, namely:</p>
<ol>
<li>Adjusted plus-minus is directly related to winning, and</li>
<li>Adjusted plus-minus adjusts for the quality of teammates and opponents.</li>
</ol>
<p>But adjusted plus-minus isn’t perfect. Next, you’ll learn why the standard adjusted plus-minus model breaks down in soccer.</p>
<h2 id="standard-apm-does-not-work-well-in-soccer">Standard APM does not work well in soccer</h2>
<p>Adjusted plus-minus has been most successful in two sports: Basketball and Hockey. However, it hasn’t had a similar impact on soccer. That’s because soccer has two fundamental issues:</p>
<ol>
<li>There aren’t a lot of substitutions, and</li>
<li>There aren’t a lot of goals.</li>
</ol>
<p>To see this, the following image compares the typical number of scoring events and substitutions in basketball, hockey, and soccer:</p>
<p><img src="/assets/images/how-aug-apm-works/scoring_vs_subs_sports-1.png" alt="" /></p>
<p>This shows that soccer has far fewer substitutions than both basketball and hockey.</p>
<p>Why is this bad? Well, the whole point of adjusted plus-minus is adjusting for teammates and opponents. For this to work well, it’s ideal to have segments with <em>different combinations of players</em>. If you don’t have different combinations of players, it’s hard to separate the effects of players on the same team, who play a lot of minutes together. At an extreme, if two players <em>always played together</em>, then their ratings would be identical.</p>
<p>For example, check out the <a href="https://www.intraocular.net/shiny/single-season-aug-apm/">top ten players</a> from the English Premier League in the 2018-19 season, ranked by adjusted plus-minus:</p>
<p><img src="/assets/images/how-aug-apm-works/APM-Sorted.png" alt="" /></p>
<p>In this season, the top 12 players only came from two teams: Manchester City and Liverpool. This isn’t surprising, because Manchester City and Liverpool <a href="https://en.wikipedia.org/wiki/2018%E2%80%9319_Premier_League">dominated the EPL</a>, both finishing more than 25 points ahead of the third-place club.</p>
<p>But this doesn’t seem quite right. In the EPL, it’s hard to imagine that the top 12 players are <em>this concentrated</em>. There <em>must</em> be <em>someone</em> on Tottenham, Arsenal, or Manchester United who is better than the \(6^{th}\) best player on Manchester City.</p>
<p>Is there a way to fix this? We think so. In the next section, you’ll learn about our method: <em>Augmented Adjusted Plus-Minus</em>.</p>
<h2 id="augmented-adjusted-plus-minus">Augmented Adjusted Plus-Minus</h2>
<p>You’ve seen that adjusted plus-minus breaks down when there aren’t a lot of substitutions. Fundamentally, that’s because soccer players on the same team play a lot of their minutes together. And this means we don’t have much data to learn the differences.</p>
<p>But intuitively, we know <em>something</em> about the players. We expect Lionel Messi to be rated higher than an average player. <em>This is the key idea Augmented APM takes advantage of</em>.</p>
<p>To make this idea actionable, we need two things:</p>
<ol>
<li>Another source of ratings that captures our intuition about how good players are, and</li>
<li>A way to incorporate these ratings in the adjusted plus-minus calculation.</li>
</ol>
<p>In soccer, perhaps the most widely used player ratings come from the video game FIFA. For this reason, <a href="https://arxiv.org/abs/1810.08032">our first adventure into Augmented APM</a> used FIFA ratings. But Augmented APM is agnostic to the choice of ratings. You can use market values from <a href="https://www.transfermarkt.us/">Transfermarkt</a>, internal ratings developed by scouts, or any other system that rates players.</p>
<p>Let’s assume you’re using the FIFA ratings. Next, we need to incorporate these ratings into the adjusted plus-minus calculation. For this, the key idea is that we can use FIFA ratings as <a href="https://en.wikipedia.org/wiki/Prior_probability">prior</a> for each player’s rating.</p>
<p>That’s all there is to it. Augmented APM computes adjusted plus-minus like normal, but it <em>augments</em> FIFA ratings into the prior distribution for each player.</p>
<p>Does this work? To check, here’s what the same 2018-19 EPL table shown in the previous section looks like, now sorted by Augmented APM:</p>
<p><img src="/assets/images/how-aug-apm-works/AAPM-Sorted.png" alt="" /></p>
<p>With Augmented APM, we no longer see 12 players from the same two teams at the top of the table. There’s still a lot of Manchester City players. But now, they’re more spread out, and some of the Liverpool players have bounced out of the top 12. Great! That’s exactly what we wanted.</p>
<p>This looks good. But is it enough to trust Augmented APM?</p>
<h2 id="why-trust-augmented-apm-better-predictions">Why trust Augmented APM? Better predictions!</h2>
<p>Why should you trust Augmented APM? You just learned that Augmented APM reduces correlation between players on the same team. This is a nice property. But alone, it’s not super persuasive.</p>
<p>A better reason to trust Augmented APM is that <em>it predicts better than other ratings</em>. In our <a href="https://arxiv.org/abs/1810.08032">paper</a>, we tested prediction accuracy for different player rating systems in the 2015-16, 2016-17, and 2017-18 EPL seasons. The paper compared the following models:</p>
<table>
<tbody>
<tr>
<td><strong>Model</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>zero</td>
<td>Predicts every segment will have 0 goal differential.</td>
</tr>
<tr>
<td>intercept</td>
<td>Predicts the learned home-field advantage for every segment.</td>
</tr>
<tr>
<td>FIFA</td>
<td>Uses the difference in teams FIFA ratings as a predictor</td>
</tr>
<tr>
<td>APM</td>
<td>Standard adjusted plus-minus with ridge regression.</td>
</tr>
<tr>
<td>Aug. APM</td>
<td>Augmented adjusted plus-minus!</td>
</tr>
</tbody>
</table>
<p>For each model, we made predictions for each segment, depending on which players were on the field, and compared our predictions against the true goal differential. To estimate the prediction error, we used 10-fold cross-validation. Here are the results:</p>
<p><img src="/assets/images/how-aug-apm-works/prediction_avg_across_seasons-all-models-v2-1.png" alt="" /></p>
<p>As you can see, Augmented APM predicts better than any other method. That’s a good reason to trust Augmented APM!</p>
<h2 id="check-out-our-augmented-apm-app">Check out our <a href="https://www.intraocular.net/shiny/single-season-aug-apm/">Augmented APM app</a>!</h2>
<p>Congrats on making it to the end of the article!</p>
<p>Computing Augmented APM is complicated. A lot that goes into it, and there’s a lot of <em>under-the-hood</em> detail you need to account for to ensure that the ratings come out accurately.</p>
<p>But as a soccer fan, looking through the final tables makes it all worth it. Augmented APM is a brand new perspective on soccer players, that hasn’t been available until now!</p>
<p>So we wanted to make sure that, not just us, but you and your fellow fans could share in the fruits of our labor. Towards this end, we’ve made our ratings publicly available online in our <a href="https://www.intraocular.net/shiny/single-season-aug-apm/">Augmented APM app</a>!</p>
<p>Right now, the Augmented APM app shows the top five leagues, in the past five seasons. But moving forward, we’ll have many additions and enhancements to the ratings.</p>
<p>We’re very interested in hearing your feedback on the ratings, ideas for improvements, things we’ve missed, and future analysis that would be of interest. So if you have any thoughts, feel free to <a href="https://www.intraocular.net/contact">contact us</a>!</p>
<p>We hope you enjoy Augmented APM as much as we do!</p>
<h2 id="references">References</h2>
<p>For details on the underlying math, implementations, and how we evaluated the predictive performance of the ratings, see the following references:</p>
<ul>
<li><a href="https://arxiv.org/abs/1810.08032">Augmenting Adjusted Plus-Minus in Soccer with FIFA Ratings</a></li>
<li><a href="http://www.intraocular.net/assets/images/how-aug-apm-works/cmsac18_presentation.pdf">CMU Sports Analytics Conference Presentation on Augmented APM</a></li>
</ul>Intraocular LLCintraocularstats@gmail.comHumans have an insatiable desire for ratings. Nowhere is this more clear than in sports.