Page 1 of 1
Discrepancies in RAPM
Posted: Tue Jul 16, 2019 6:44 am
by Rd11490
I'm trying to reconcile some discrepancies between my version of RAPM and JE's version of RAPM for the 2016-17 season.
JE:
https://docs.google.com/spreadsheets/d/ ... HraF4/edit
RD:
https://drive.google.com/open?id=1l2vD9 ... VSciTqECJf
Other than the obvious differences in individual player values, one thing that stands out is the league average for RAPM. In both my version and the version that Shadow posts it averages out to just about 0. In JE's version it averages out to -.47. When you do a weighted average of JE's by possessions it averages to 0. I can't figure out why this is and would love any insights. If anyone has any insights on the differences i'd love to hear them, because beyond hyper params and differences in how we parse possessions, i'm at a complete loss.
Re: Discrepancies in RAPM
Posted: Tue Jul 16, 2019 12:41 pm
by J.E.
Rd11490 wrote: ↑Tue Jul 16, 2019 6:44 amWhen you do a weighted average of JE's by possessions it averages to 0. I can't figure out why this is and would love any insights. If anyone has any insights on the differences i'd love to hear them
I simply force it to be this way, ie I compute the possession weighed average and then subtract that from everyone's original rating. Just a general practice I started doing, as some priors would skew ratings in different ways, and this was an easy way to keep things on one "level"
Also has the benefit of the resulting team strength ratings - based on RAPM x Minutes - being centered around 0
Re: Discrepancies in RAPM
Posted: Tue Jul 16, 2019 1:53 pm
by Rd11490
You're the best, thanks for the quick answer. This difference has been bothering me for a couple of days and I've been at a complete loss for what I was doing wrong.
Re: Discrepancies in RAPM
Posted: Tue Jul 16, 2019 3:38 pm
by kmedved
Our of curiosity Ryan, what's the difference between the version of RAPM you posted here, and the version on NBAShotCharts? I see slight differences throughout. Is this a playoffs inclusion thing?
Re: Discrepancies in RAPM
Posted: Tue Jul 16, 2019 4:33 pm
by Rd11490
The one posted here was an attempt to get as close as possible to JEs values. Playoffs are included here and the lambda value is different here than on the site.
Re: Discrepancies in RAPM
Posted: Tue Jul 02, 2024 3:27 am
by gnomp
J.E. wrote: ↑Tue Jul 16, 2019 12:41 pm
Rd11490 wrote: ↑Tue Jul 16, 2019 6:44 amWhen you do a weighted average of JE's by possessions it averages to 0. I can't figure out why this is and would love any insights. If anyone has any insights on the differences i'd love to hear them
I simply force it to be this way, ie I compute the possession weighed average and then subtract that from everyone's original rating. Just a general practice I started doing, as some priors would skew ratings in different ways, and this was an easy way to keep things on one "level"
Also has the benefit of the resulting team strength ratings - based on RAPM x Minutes - being centered around 0
Do you still force-center your RAPM results (when weighted by possessions)? My possession-weighted RAPMs keep coming out to around 0.5 (both offensive and defensive coefficients), and it's nagging at me. I've followed your suggestions from the other thread -- subtracting out league average O-Rating, not fitting an intercept, running cross validation with different lambdas, etc. I just can't figure out how the solution which minimizes the loss function for ridge has a weighted average that differs somewhat significantly from 0, when the target obviously has a weighted average of 0. This is especially weird to me seeing that nonzero coefficients are of course penalized in ridge.
Is this just normal for RAPM calculations?
Re: Discrepancies in RAPM
Posted: Tue Jul 02, 2024 7:51 am
by J.E.
gnomp wrote: ↑Tue Jul 02, 2024 3:27 am
J.E. wrote: ↑Tue Jul 16, 2019 12:41 pm
Rd11490 wrote: ↑Tue Jul 16, 2019 6:44 amWhen you do a weighted average of JE's by possessions it averages to 0. I can't figure out why this is and would love any insights. If anyone has any insights on the differences i'd love to hear them
I simply force it to be this way, ie I compute the possession weighed average and then subtract that from everyone's original rating. Just a general practice I started doing, as some priors would skew ratings in different ways, and this was an easy way to keep things on one "level"
Also has the benefit of the resulting team strength ratings - based on RAPM x Minutes - being centered around 0
Do you still force-center your RAPM results (when weighted by possessions)? My possession-weighted RAPMs keep coming out to around 0.5 (both offensive and defensive coefficients), and it's nagging at me. I've followed your suggestions from the other thread -- subtracting out league average O-Rating, not fitting an intercept, running cross validation with different lambdas, etc. I just can't figure out how the solution which minimizes the loss function for ridge has a weighted average that differs somewhat significantly from 0, when the target obviously has a weighted average of 0. This is especially weird to me seeing that nonzero coefficients are of course penalized in ridge.
Is this just normal for RAPM calculations?
I wouldn't worry about it too much.
For one thing, all betas (coefficients) have the same weight in the penalization term, regardless of player possessions played. So the calculations definitely aren't trying to minimize the weighed squared sum, but moreso the unweighed squared sum.
All that said, we should only expect perfect centering around 0 - if we draw from a normal distribution with mean 0, some random SD - of the betas *in the absence of data*.
As long as the sum of everything, including (y-beta*X), is minimized, the ridge function is ok with spitting out not perfectly centered betas
Re: Discrepancies in RAPM
Posted: Mon Jul 08, 2024 2:36 am
by gnomp
Thanks JE, that explanation makes a lot of sense, especially about the squared sum penalty being unweighted. In that case I suppose I'll just continue force-centering my RAPM post-processing.