One Year RAPM and Weighted Ridge Regression

Home for all your discussion of basketball statistical analysis.
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

One Year RAPM and Weighted Ridge Regression

Post by permaximum »

EDIT (DSMok1): Split off of Permaximum Ratings and Rankings (Updated Often), since this is a different topic.


I think, it's better to ask it here. Does anyone have 1 year RAPM with the prior as zero for previous seasons? I mean, the very first RAPM which is just the regularized-APM. If nobody has it, the second question comes. How can I run a "weighted ridge regression" with R or another language/software? lm.ridge and ridge.cv functions don't have weight argument.
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by DSMok1 »

permaximum wrote:I think, it's better to ask it here. Does anyone have 1 year RAPM with the prior as zero for previous seasons? I mean, the very first RAPM which is just the regularized-APM. If nobody has it, the second question comes. How can I run a "weighted ridge regression" with R or another language/software? lm.ridge and ridge.cv functions don't have weight argument.
Right, they don't. What I found as the way to do it was to assign each player a single observation of 0 with a specified weight, and then run the normal weighted regression function.

You'd have to find that weight through leave-n out cross validation.

The data frame would likely have to be n*2 players wide (a column for O and a column for D), plus the offensive efficiency of the O side of the matchup & a column for weight (# of possessions), and would be 2*matchups+n players tall (for the O observation for each side of a matchup and the prior).

Make sense?
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
Crow
Posts: 10533
Joined: Thu Apr 14, 2011 11:10 pm

Re: Permaximum Ratings and Rankings (Updated Often)

Post by Crow »

If J.E. does not offer them up to you directly, I probably have some previous year non-prior informed RAPM files I could dig up later. If you send me a private message with an e-mail address I could probably send what I find sometime in the next week.
EvanZ
Posts: 912
Joined: Thu Apr 14, 2011 10:41 pm
Location: The City
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by EvanZ »

permaximum wrote:I think, it's better to ask it here. Does anyone have 1 year RAPM with the prior as zero for previous seasons? I mean, the very first RAPM which is just the regularized-APM. If nobody has it, the second question comes. How can I run a "weighted ridge regression" with R or another language/software? lm.ridge and ridge.cv functions don't have weight argument.
Use glmnet with

Code: Select all

alpha=0
.

http://cran.r-project.org/web/packages/ ... index.html
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

Re: Permaximum Ratings and Rankings (Updated Often)

Post by permaximum »

@DSMok1

Thanks for the explanation but I think I'm gonna check glmnet function first.

@Crow

Thank you. I will probably send the pm :)

@EvanZ

Thank you so much. I'll try it.

@MikeG

Ed Davis started in the last 10 games of Toronto and Toronto went 8-2. Before that, Toronto went 4-18 with him coming of the bench :) Let's see what happens when Drummond and McGee starts for their teams.

Edit: Although glmnet gives a little bit different results than other functions (lm, lm.ridge, ridge.cv) it's good to see it work with weights argument while the others can't. Ronnie Price tops 2007/08 1 year pure RAPM chart. Can anybody confirm this nonsense is not a problem of the data I took from basketballvalue.com? If it's accurate, I will realy start to doubt +/-, because with many years of data, priors, involvement of box score etc. any rating can pass laugh test. I hope there were errors with the data.
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by DSMok1 »

1 Year APM is extremely noisy due to very heavy collinearity issues (many players share the court most or all of the time).

Since players switch teams and rotations change, multi-year APM is way better.

See my exhaustive review on the subject at http://godismyjudgeok.com/DStats/2011/n ... ilization/
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

Re: Permaximum Ratings and Rankings (Updated Often)

Post by permaximum »

DSMok1 wrote:1 Year APM is extremely noisy due to very heavy collinearity issues (many players share the court most or all of the time).

Since players switch teams and rotations change, multi-year APM is way better.

See my exhaustive review on the subject at http://godismyjudgeok.com/DStats/2011/n ... ilization/
It wasn't APM. Price tops all players in RAPM chart that year. I thought RAPM was made exactly for collinearity issues.

I read that article before and found very informative. It was a great read.
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by DSMok1 »

permaximum wrote:
DSMok1 wrote:1 Year APM is extremely noisy due to very heavy collinearity issues (many players share the court most or all of the time).

Since players switch teams and rotations change, multi-year APM is way better.

See my exhaustive review on the subject at http://godismyjudgeok.com/DStats/2011/n ... ilization/
It wasn't APM. Price tops all players in RAPM chart that year. I thought RAPM was made exactly for collinearity issues.

I read that article before and found very informative. It was a great read.
Even with the RAPM adjustment--I still am vary wary of anything single year. Regularization only helps the collinearity so much. If two players are perfectly collinear--you just can't disentangle them at all. Period.
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
talkingpractice
Posts: 194
Joined: Tue Oct 30, 2012 6:58 pm
Location: The Alpha Quadrant
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by talkingpractice »

permaximum wrote: Edit: Although glmnet gives a little bit different results than other functions (lm, lm.ridge, ridge.cv) it's good to see it work with weights argument while the others can't. Ronnie Price tops 2007/08 1 year pure RAPM chart. Can anybody confirm this nonsense is not a problem of the data I took from basketballvalue.com? If it's accurate, I will realy start to doubt +/-, because with many years of data, priors, involvement of box score etc. any rating can pass laugh test. I hope there were errors with the data.
From testing we've done, there just isn't much of a predictive nature at all to a non prior informed 1yr apm model (regularized or not). You need years of data to get the n's big enough.
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

Re: Permaximum Ratings and Rankings (Updated Often)

Post by permaximum »

talkingpractice wrote:
permaximum wrote: Edit: Although glmnet gives a little bit different results than other functions (lm, lm.ridge, ridge.cv) it's good to see it work with weights argument while the others can't. Ronnie Price tops 2007/08 1 year pure RAPM chart. Can anybody confirm this nonsense is not a problem of the data I took from basketballvalue.com? If it's accurate, I will realy start to doubt +/-, because with many years of data, priors, involvement of box score etc. any rating can pass laugh test. I hope there were errors with the data.
From testing we've done, there just isn't much of a predictive nature at all to a non prior informed 1yr apm model (regularized or not). You need years of data to get the n's big enough.
Actually, I was looking for explanation of player performances in a season instead of prediction of future performances. That's why I wanted 1 year RAPM. But the results were very disappointing. So this Ronnie Price joke definetely confirms RAPM is very bad for explenation of performances in a season. As for prediction, what's the target? +/- of next season?
talkingpractice
Posts: 194
Joined: Tue Oct 30, 2012 6:58 pm
Location: The Alpha Quadrant
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by talkingpractice »

Ed Davis started in the last 10 games of Toronto and Toronto went 8-2. Before that, Toronto went 4-18 with him coming of the bench Let's see what happens when Drummond and McGee starts for their teams.
Per Rotoworld lol...

"Coach Dwane Casey said Friday that "it will be hard to pull Ed Davis out of the (starting) line up" when Andrea Bargnani (elbow) returns. Davis has started the last 10 games, averaging 12.4 points, 7.1 rebounds, 0.9 blocks and 0.9 steals. The Raptors have gone 8-2 during that stretch. "He's earned it," Casey said." Jan 4 - 6:08 PM
EvanZ
Posts: 912
Joined: Thu Apr 14, 2011 10:41 pm
Location: The City
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by EvanZ »

permaximum wrote: Actually, I was looking for explanation of player performances in a season instead of prediction of future performances. That's why I wanted 1 year RAPM. But the results were very disappointing. So this Ronnie Price joke definetely confirms RAPM is very bad for explenation of performances in a season. As for prediction, what's the target? +/- of next season?
Ronnie Price only played 10 mpg that season. Who's the highest rated player that played > 30 mpg? It's probably going to be more meaningful.
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Permaximum Ratings and Rankings (Updated Often)

Post by Kevin Pelton »

Despite its limitations, I wish there was single-season RAPM (or even APM) available to answer questions that multi-season RAPM isn't designed to answer, like how Dwight Howard's defense is different post-surgery.
EvanZ
Posts: 912
Joined: Thu Apr 14, 2011 10:41 pm
Location: The City
Contact:

Re: Permaximum Ratings and Rankings (Updated Often)

Post by EvanZ »

I'm planning to do it, KP. Maybe at the All-Star break.
bchaikin
Posts: 307
Joined: Thu May 12, 2011 2:09 am

Re: Permaximum Ratings and Rankings (Updated Often)

Post by bchaikin »

like how Dwight Howard's defense is different post-surgery

for howard Synergy shows excellent man defense, a very low PPP and eFG% allowed, almost as low as Cs joakim noah and marc gasol. he's also blocking shots at his highest rate in 3 seasons...
Post Reply