summaryrefslogtreecommitdiff
path: root/f1elo/elo.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-10-06 16:08:48 +0200
committeremkael <emkael@tlen.pl>2014-10-06 16:08:48 +0200
commit11e3b2851216a3fa24efd52e094d83c608766444 (patch)
tree83dd8f9880b8085b39aa28480b371387009a9002 /f1elo/elo.py
parent55e966eb554143cee7fe81ee574fca22a6bb25ff (diff)
* removed commented out debug info
Diffstat (limited to 'f1elo/elo.py')
-rw-r--r--f1elo/elo.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/f1elo/elo.py b/f1elo/elo.py
index 3ddc6e4..dcf24dd 100644
--- a/f1elo/elo.py
+++ b/f1elo/elo.py
@@ -32,11 +32,6 @@ class Elo:
entries_to_compare.append(e)
for c in combinations(entries_to_compare, 2):
score = self.get_score(rankings[c[0]] - rankings[c[1]], self.get_outcome(c), self.get_importance(race, [rankings[c[0]], rankings[c[1]]]))
- #print c[0], '@', rankings[c[0]]
- #print 'against'
- #print c[1], '@', rankings[c[1]]
- #print 'score: ', score
- #print
new_rankings[c[0]] += score
new_rankings[c[1]] -= score
return new_rankings
@@ -49,7 +44,7 @@ class Elo:
if min_rank <= 2400:
return base_importance * 0.75
return base_importance / 2
-
+
def get_outcome(self, entries):
if entries[0].result_group < entries[1].result_group:
@@ -57,6 +52,6 @@ class Elo:
elif entries[0].result_group > entries[1].result_group:
return 0
return 0.5
-
+
def get_score(self, difference, outcome, importance):
return importance * (outcome - 1 / (1 + (10 ** (-difference / self.config['disparity']))))