quick fixes

This commit is contained in:
art 2019-10-05 16:51:11 -05:00
parent c31de42a99
commit 92f376e598

View File

@ -7,7 +7,7 @@
# current benchmark of optimization: 1.33 times faster # current benchmark of optimization: 1.33 times faster
# setup: # setup:
__version__ = "1.1.4.000" __version__ = "1.1.4.001"
# changelog should be viewed using print(analysis.__changelog__) # changelog should be viewed using print(analysis.__changelog__)
__changelog__ = """changelog: __changelog__ = """changelog:
@ -190,9 +190,9 @@ try:
except: except:
pass pass
try: try:
from analysis import trueskill from analysis import trueskill as ts
except: except:
import trueskill import trueskill as ts
from sklearn import metrics from sklearn import metrics
from sklearn import preprocessing from sklearn import preprocessing
import torch import torch
@ -341,14 +341,14 @@ def trueskill(teams_data, observations):#teams_data is array of array of tuples
team_temp = [] team_temp = []
for player in team: for player in team:
if player != None: if player != None:
player = trueskill.Rating(player[0], player[1]) player = ts.Rating(player[0], player[1])
team_temp.append(player) team_temp.append(player)
else: else:
player = trueskill.Rating() player = ts.Rating()
team_temp.append(player) team_temp.append(player)
team_ratings.append(team_temp) team_ratings.append(team_temp)
return trueskill.rate(teams_data, observations) return ts.rate(teams_data, observations)
@jit(forceobj=True) @jit(forceobj=True)
def r_squared(predictions, targets): # assumes equal size inputs def r_squared(predictions, targets): # assumes equal size inputs