mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2026-01-22 02:47:39 +01:00
visual improvements, migrate main view to dataTable
This commit is contained in:
@@ -39,10 +39,24 @@ class MapSummary:
|
||||
self.averageTime = datetime.timedelta(seconds=int(averageSeconds))
|
||||
|
||||
mapper = [ 1 if x == 0 else -1 for x in self.predictions ]
|
||||
reverseMapper = [ 1 if x == 0 else 0 for x in self.predictions ]
|
||||
self.ratingSystemDeviation = 0
|
||||
for i in range(0, len(self.confidence)):
|
||||
self.ratingSystemDeviation += mapper[i] * self.confidence[i]
|
||||
self.ratingSystemDeviation /= self.totalGames
|
||||
|
||||
confidenceCutoff = 60
|
||||
confidenceTupels = list(filter(lambda x: x[1] > confidenceCutoff,
|
||||
zip(reverseMapper, self.confidence)))
|
||||
|
||||
mapperTupels = list(filter(lambda x: x[1] > confidenceCutoff,
|
||||
zip(mapper, self.confidence)))
|
||||
|
||||
for i in range(0, len(mapperTupels)):
|
||||
self.ratingSystemDeviation += mapperTupels[i][0] * max(100, 50+mapperTupels[i][1])
|
||||
|
||||
self.ratingSystemDeviation /= len(mapperTupels)
|
||||
self.predictionCorrectPercentage = sum([x[0] for x in confidenceTupels])
|
||||
self.predictionCorrectPercentage /= len(confidenceTupels)
|
||||
self.predictionCorrectPercentage *= 100
|
||||
self.predictionCorrectPercentage = round(self.predictionCorrectPercentage)
|
||||
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user