diff options
-rw-r--r-- | config/elo.json | 17 | ||||
-rw-r--r-- | f1elo/elo.py | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/config/elo.json b/config/elo.json index e50822b..f47aefd 100644 --- a/config/elo.json +++ b/config/elo.json @@ -1,10 +1,11 @@ { - "initial_ranking": 1450.0, - "disparity": 400, - "importance": { - "NC_Q": 1.6, - "NC_R": 16, - "C_Q": 3.2, - "C_R": 32 - } + "initial_ranking": 1600.0, + "disparity": 300, + "importance": { + "NC_Q": 1.6, + "NC_R": 16, + "C_Q": 3.2, + "C_R": 32 + }, + "importance_threshold": [ 2000, 1800 ] } diff --git a/f1elo/elo.py b/f1elo/elo.py index 5e6986c..6a007d8 100644 --- a/f1elo/elo.py +++ b/f1elo/elo.py @@ -39,9 +39,9 @@ class Elo: def get_importance(self, race, rankings): base_importance = self.config['importance'][race.type.code] min_rank = min(rankings) - if min_rank < 2100: + if min_rank < min(self.config['importance_threshold']): return base_importance - if min_rank <= 2400: + if min_rank <= max(self.config['importance_threshold']): return base_importance * 0.75 return base_importance / 2 |