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

Add "garbage time" filter #40

Closed Alex-At-Home closed 4 years ago

Alex-At-Home commented 4 years ago

(could replace the walk-on filter for now, since it accomplishes basically the same thing)

Have a look at what people are defining as garbage time, but something like:

Alex-At-Home commented 4 years ago

Some notes:

https://kenpom.com/blog/the-simplest-proof-that-overtime-data-is-useful-and-that-garbage-time-exists/

18pts with 5 mins remaining ... seems a little aggressive 15pts with 2 mins remaining

Alex-At-Home commented 4 years ago

The one Torvik uses ... http://www.slate.com/articles/sports/sports_nut/2008/03/the_lead_is_safe.html

So 18 points would be 275 seconds ie 4m15s (better I think) 15 points would be 144 seconds 2m24s

Maybe limit to last 5 minutes regardless?

AlexP-Elastic commented 4 years ago

This seems to work:

def diff = doc["score_info.start_diff"].value;
def abs_diff = Math.abs(diff) - 0.5;
def diff_to_sq = abs_diff >= 0.0 ? abs_diff : 0.0;
def diff_sq = diff_to_sq*diff_to_sq;
// (OT case filtered out)
def remaining = (40.0 - doc["start_min"].value)*60.0;
diff_sq > remaining;