ntbloom / gamewinner

college bball bracket predictor -- bring your own algo
GNU General Public License v3.0
1 stars 1 forks source link

Database of rankings data #1

Closed seth127 closed 1 year ago

seth127 commented 1 year ago

Maybe you already have something like this, but it would be awesome if you could include a small database that had all the eligible teams and logged all the attributes of Team once a week for the last month of the season.

Imagine I could do things like this:

team1.rank_nat [0] # national ranking in Selection Sunday (3/12)
team1.rank_lunardi[1] # Joe Lunardi rank on 3/5
team1.rank_kenpom[2] # Pomeroy rank on 2/26
# etc with other metrics...

I'd be shocked if we can't pull almost anything we'd want from an API somewhere. Danny might know where.

If we find a good spot, we could even grab stats like points-scored-per-game and points-allowed-per-game and free-throw-pct. We might even be able to pull or scrape all of this and more from the KenPom website. Look at all these goodies:

image

These algorithms could get kinda fun if we get all that in there for people to play with.

seth127 commented 1 year ago

We need a function to convert ranks to percentiles. Once we add it, this is my first Strategy:

# higher score wins each game
max(
  mean(lunardi_pctl[0:1]) +
  kenpom_pctl[0] + 
  mean(rank_nat_pctl[0:3]) + 
  free_throw_pctl[0] + 
  rank_reg_pctl
)

Maybe have some kind of upset stochastic thing. Flip a coin to reverse the rank_reg_percentile on every match up?

ntbloom commented 1 year ago

This sounds a lot like an implementation details that would live inside an IStrategy subclass. This library is more about structuring and playing out the tournament itself without respect to the actual strategy used.

I'll add some features to make it more easy to do some of this work, so stay tuned.