Closed matttrenary closed 1 year ago
Since these issues are so few and far between, I think this is due to natural rounding errors in python, which are caused because of the way python stores float variables.
How to check if I'm right Look at the float-valued rating adjustments instead of the rounded versions. I'm guessing that it's really Brown +8.49 and Wheeling -8.51 or something. The 0.02 difference is caused by the rounding error, and our own rounding at the end exacerbates it.
My solution We could solve this (and make code more efficient) by calculating the ratings increase/decrease for only 1 of the 2 teams, and then simply applying it to the second team.
That makes sense. Yeah, duh, good thinking that we only need to calculate it once. Go for it.
The rating adjustment getting displayed was using the final rating minus the original rating, instead of using the calculated rating change. Updated calc_ratings.py to use the calculated change.
For example, Brown vs Wheeling on 11/19/2022. Brown is +8, Wheeling is -9 Louisville vs South Carolina on 11/19/22. Louisville +14, South Carolina -13 Fairfield vs Thomas More on 11/19/22. Fairfield -86, Thomas More +85 etc.