mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
quick refactor of glicko2()
This commit is contained in:
parent
5af003b6f5
commit
ab8a796f58
Binary file not shown.
@ -312,11 +312,11 @@ def elo(starting_score, opposing_scores, observed, N, K):
|
||||
|
||||
return starting_score + K*(np.sum(observed) - np.sum(expected))
|
||||
|
||||
def gliko2(opp_ratings, opp_rd, observations, rating = 1500, rd = 350, vol = 0.06):
|
||||
def gliko2(starting_score, starting_rd, starting_vol, opposing_scores, opposing_rd, observations):
|
||||
|
||||
player = gliko2_engine(rating = rating, rd = rd, vol = vol)
|
||||
player = gliko2_engine(rating = starting_score, rd = starting_rd, vol = starting_vol)
|
||||
|
||||
player.update_player([x for x in opp_ratings], [x for x in opp_rd], observations)
|
||||
player.update_player([x for x in opposing_scores], [x for x in opposing_rd], observations)
|
||||
|
||||
return (player.rating, player.rd, player.vol)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user