summaryrefslogtreecommitdiff
path: root/f1elo
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-10-28 16:55:10 +0100
committeremkael <emkael@tlen.pl>2014-10-28 16:55:10 +0100
commite86cc61995d59730a2fe3f04415b25b35ec207c5 (patch)
treef942aee36c936229c39e536926733397e55f4c25 /f1elo
parente1dfc0b8eaea4e9e2f35f49ff55b750eb4b08da0 (diff)
* configurable importance factor thresholds + tweaks to default settings
Diffstat (limited to 'f1elo')
-rw-r--r--f1elo/elo.py4
1 files changed, 2 insertions, 2 deletions
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