Alex-At-Home / cbb-on-off-analyzer

A not-so-simple-any-more! SPA for rendering college basketball on/off analysis
https://cbb-on-off-analyzer.now.sh
Apache License 2.0
0 stars 2 forks source link

RAPM phases 2+ #66

Open Alex-At-Home opened 4 years ago

Alex-At-Home commented 4 years ago
Alex-At-Home commented 4 years ago

So currently the effect of my unbiasing is to dole out the adjusted margin in approx % of minutes played, which is not ideal

Alternatives:

(Useful page with some info about error estimation: https://stats.stackexchange.com/questions/216335/standard-error-for-a-parameter-in-ordinary-least-squares)

Alex-At-Home commented 4 years ago

Did some experiments here: https://github.com/Alex-At-Home/cbb-on-off-analyzer/tree/rapm_experiments

Alex-At-Home commented 3 years ago

UPDATED: fixed by https://github.com/Alex-At-Home/cbb-on-off-analyzer/commit/d6528a6ec2c0288ff973230156f8086e51cece0d

As I feared but stupidly didn't follow up on hard enough, you can run into trouble if the delta over average is near 0, eg here's the Xavier offense:

[Log] ********* [off] RAPM WITH LAMBDA 2.240 / 4
[Log] ["Marshall, Naji", "Carter, Jason", "Scruggs, Paul", "Jones, Tyrique", "Goodin, Quentin", "Freemantle, Zach", "Tandy, KyKy", "Moore, Bryce", "Bishop, Dahmir", "James, Dontarius"] (10)
[Log] rapm[PRE]: 0.761,-0.218,0.509,1.277,-0.048,-0.702,0.462,-0.848,-0.371,0.282
[Log] rapm[POST]: -4.968,4.822,-1.731,-9.310,7.790,-3.268,2.352,10.879,19.736,11.289
[Log] combinedRapm[PRE] = [1.2] vs actualEff = [1.7] ... Err[PRE] = [0.5] Err[POST]=[0.0]

RAPM comes up with a super sane estimate but to handle that 0.5 error, it adds lots of big +ve and -ve numbers together :(

RAPM Priors = [{"includeStrong":{},"playersStrong":[{},{},{},{},{},{},{},{},{},{}],"playersWeak":[{"off_adj_ppp":2.607,"def_adj_ppp":-2.046},{"off_adj_ppp":-2.294,"def_adj_ppp":-1.841},{"off_adj_ppp":1.02,"def_adj_ppp":-1.807},{"off_adj_ppp":4.819,"def_adj_ppp":-2.984},{"off_adj_ppp":-3.567,"def_adj_ppp":-1.312},{"off_adj_ppp":1.168,"def_adj_ppp":-1.401},{"off_adj_ppp":-0.86,"def_adj_ppp":-0.127},{"off_adj_ppp":-5.337,"def_adj_ppp":-1.411},{"off_adj_ppp":-9.151,"def_adj_ppp":-1.434},{"off_adj_ppp":-5.01,"def_adj_ppp":-0.012}]}]

In fact you'll see Goodin goes from -0.048 before to +7.790 with his prior of -3.567

Alex-At-Home commented 3 years ago

During testing of #171, seem to have found a bug

Compare Prim Gaige's leaderboard vals vs report vals:

His RAPM in the leaderboard was been splatted

Ah so when I run in diag mode, it starts at an earlier lambda and then picks the 2nd iteration - ah looks like it is now always picking the 2nd iteration (actually I noticed that in the unit test but assumed that was legit :( )

combinedRapm[PRE] = [6.9] vs actualEff = [6.1] ... Err[PRE] = [0.8] Err[POST] = [2.2]