<<

Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Intensity Surfaces

Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces

Devan Becker, Ph.D. Candidate Department of Statistical and Actuarial Sciences The University of Western Ontario, Canada

Collaborators: Charmaine Dean and Douglas Woolford

New England Symposium on Statistics in Sports Harvard University September 28, 2019

Devan Becker - [email protected] University of Western Ontario 1 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Introduction

Introduction

Devan Becker - [email protected] University of Western Ontario 2 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Introduction

A Song of and Forest Fire

Devan Becker - [email protected] University of Western Ontario 3 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Introduction

Outline

• Describe the NMF-LGCP algorithm in general.

• Apply it to NHL shot data.

• Use these estimates to describe shot efficiency (with a twist).

Devan Becker - [email protected] University of Western Ontario 4 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Image Recognition and Spatial Estimates

Devan Becker - [email protected] University of Western Ontario 5 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Idea: Convert one big matrix into two smaller matrices

X ≈ WH

• X is a giant collection of images • In this case, LGCP estimates of the shot locations.

• W defines the “bases” • Building blocks for all images

• H defines the “coefficients” • How much each image uses each building block

Devan Becker - [email protected] University of Western Ontario 6 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Dummy Data and Estimates

Normalized soDevan that Becker the - [email protected] total volumeUniversity is 1 so of Western that Ontario we are focused on 7 location, not number of goals. Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Dummy Bases and Coefficients

Devan Becker - [email protected] University of Western Ontario 8 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Choosing the number of bases

• Too many bases and you’re modelling the noise.

• Too few and your residuals are too large.

• Balance: Interpretability and accuracy.

Devan Becker - [email protected] University of Western Ontario 9 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

NHL Shot Location Data

• Scraped from https://statsapi.web.nhl.com/api/v1/. . . • Incomplete version available from a Kaggle data set. • Always check robots.txt before scraping.

• Only looked at players with > 500 shots.

• Removed rebounds. • Focused on shot choice, not opportunity. In all, 510,847 shots and goals from 466 players.

Devan Becker - [email protected] University of Western Ontario 10 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Estimated Bases for NHL Data

Devan Becker - [email protected] University of Western Ontario 11 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Some Select Players

Crease LCrease RCrease/LIce Slot

Alex Ovechkin (LW−R) P.K. Subban (D−R) (C−R) (C−L) Connor McDavid (C−L) Anze Kopitar (C−L) 0.0 0.5 1.0 1.5 2.0 2.5 RIce RPoint LPoint

Alex Ovechkin (LW−R) P.K. Subban (D−R) Ryan Getzlaf (C−R) Sidney Crosby (C−L) Connor McDavid (C−L) Anze Kopitar (C−L) 0.0 0.5 1.0 1.5 2.0 2.50.0 0.5 1.0 1.5 2.0 2.50.0 0.5 1.0 1.5 2.0 2.5 Coefficient (x100)

Different position/handedness shoot from different places, but same position/handedness can be different too.

Devan Becker - [email protected] University of Western Ontario 12 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Image Recognition and Spatial Estimates

Basis Results - Outliers

Principal Components of Coefficients

C−L C−R D−L D−R 0.03

0.02 Lecavalier Malkin 0.01 Wisniewski Spooner Coburn Subban Niskanen 0.00 Richards Stoll Daley Mitchell Ott Getzlaf −0.01 Rask −0.02 Oduya −0.03 LW−L LW−R RW−L RW−R 0.03

0.02 PCA Dimension 2 Hoffman Yakupov 0.01 Thornton Voracek Pominville Hansen Drouin Jagr Steen Dupuis Pastrnak 0.00 Ovechkin TeravainenBeleskey Kopecky Laine Read Kovalchuk −0.01 Clifford Bickell Iginla −0.02

−0.03 −0.02 −0.01 0.00 0.01 −0.02 −0.01 0.00 0.01 −0.02 −0.01 0.00 0.01 −0.02 −0.01 0.00 0.01 PCA Dimension 1

Devan Becker - [email protected] University of Western Ontario 13 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Shot Quality

Devan Becker - [email protected] University of Western Ontario 14 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Basketball versus Hockey

For players who played at least half of the 2017-2018 : Basketball • WORST 3- percentage: 29.8% (Russell Westbrook) Hockey • BEST shooting percentage: 23.5% (Alexander Kerfoot)

Hockey just doesn’t have enough goals per player!

Devan Becker - [email protected] University of Western Ontario 15 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Where do Goals Come From?

Devan Becker - [email protected] University of Western Ontario 16 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Perfect Players

Instead of looking at a player’s goals, we use the goals as a player. • Goals are split up based on position/handedness. • Name of player is replaced by the position/handedness. • These “perfect players” are added to the algortihm.

Devan Becker - [email protected] University of Western Ontario 17 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Coefficients for the Perfect Players

Coefficients for Perfect Players

Crease LCrease RCrease/LIce Slot

RW−R RW−L LW−R LW−L D−R D−L C−R C−L 0.0 0.5 1.0 1.5 2.0 RIce RPoint LPoint

RW−R RW−L

Position/Handedness LW−R LW−L D−R D−L C−R C−L 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 Coefficient (x100)

Devan Becker - [email protected] University of Western Ontario 18 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Comparing Stastny, Crosby, and Aho to the Perfect Player

Crease LCrease RCrease/LIce Slot

C−L

Paul Stastny

Sidney Crosby

Sebastian Aho

0.0 0.5 1.0 1.5 RIce RPoint LPoint Player C−L

Paul Stastny

Sidney Crosby

Sebastian Aho

0.0 0.5 1.0 1.5 0.0 0.5 1.0 1.5 0.0 0.5 1.0 1.5 Coefficient (x100)

• Stastny: Follows the Perfect Player, “Could stand to shoot the puck more.” - EliteProspects.com • Crosby: Shoots from different place, but scores. • Aho: “Very good passer.” - EliteProspects.com

Devan Becker - [email protected] University of Western Ontario 19 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Euclidean distance as shot quality

Players "closest" to the perfect player have better shooting percentage Blue line is the linear trend.

C−L C−R D−L D−R 0.150 0.08 0.07 0.07 0.12 0.125 0.06 0.06 0.09 0.100 0.05 0.05 0.04 0.06 0.075 0.04 0.03 0.03 0.2 0.3 0.4 0.5 0.6 0.2 0.3 0.4 0.5 0.6 0.7 0.3 0.4 0.5 0.2 0.3 0.4 0.5 0.6

LW−L LW−R RW−L RW−R 0.14 0.150 0.12 0.14 0.12 0.125 0.10 0.12 Shooting Percentage 0.10 0.08 0.100 0.10 0.08 0.06 0.075 0.08 0.06 0.04 0.04 0.2 0.4 0.6 0.3 0.4 0.5 0.6 0.3 0.4 0.5 0.3 0.4 0.5 0.6 0.7 Euclidean Distance from Perfect Player

Recall: estimates were normalized to not include the number of shots or goals.

Devan Becker - [email protected] University of Western Ontario 20 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Conclusions

• Bases provide good foundations for heuristic advice. • “Shoot more when you’re at the point, less from the faceoff circle.”

• Coefficients simplify the comparison of player shooting strategy.

• Perfect players give us a measure of quality when we don’t have enough data.

• Playing like a perfect player does not mean you’ll always score.

Devan Becker - [email protected] University of Western Ontario 21 Comparing NHL Players’ Shots and Goals by Algorithmically Decomposing Shot Intensity Surfaces Shot Quality

Acknowledgements

Devan Becker - [email protected] University of Western Ontario 22