From e86cc61995d59730a2fe3f04415b25b35ec207c5 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 28 Oct 2014 16:55:10 +0100 Subject: * configurable importance factor thresholds + tweaks to default settings --- f1elo/elo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'f1elo') 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 -- cgit v1.2.3