analysis.py v 1.1.12.005

analysis pkg v 1.0.0.002
This commit is contained in:
ltcptgeneral
2020-03-04 18:55:45 -06:00
parent 0d120e572f
commit 49c8bcafde
7 changed files with 109 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: analysis
Version: 1.0.0.1
Version: 1.0.0.2
Summary: analysis package developed by Titan Scouting for The Red Alliance
Home-page: https://github.com/titanscout2022/tr2022-strategy
Author: The Titan Scouting Team

View File

@@ -7,10 +7,12 @@
# current benchmark of optimization: 1.33 times faster
# setup:
__version__ = "1.1.12.004"
__version__ = "1.1.12.005"
# changelog should be viewed using print(analysis.__changelog__)
__changelog__ = """changelog:
1.1.12.005:
- fixed numba issues by removing numba from elo, glicko2 and trueskill
1.1.12.004:
- renamed gliko to glicko
1.1.12.003:
@@ -384,14 +386,12 @@ def regression(ndevice, inputs, outputs, args, loss = torch.nn.MSELoss(), _itera
return regressions
@jit(nopython=True)
def elo(starting_score, opposing_score, observed, N, K):
expected = 1/(1+10**((np.array(opposing_score) - starting_score)/N))
return starting_score + K*(np.sum(observed) - np.sum(expected))
@jit(forceobj=True)
def glicko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_rd, observations):
player = Glicko2(rating = starting_score, rd = starting_rd, vol = starting_vol)
@@ -400,7 +400,6 @@ def glicko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_
return (player.rating, player.rd, player.vol)
@jit(forceobj=True)
def trueskill(teams_data, observations): # teams_data is array of array of tuples ie. [[(mu, sigma), (mu, sigma), (mu, sigma)], [(mu, sigma), (mu, sigma), (mu, sigma)]]
team_ratings = []

View File

@@ -7,10 +7,12 @@
# current benchmark of optimization: 1.33 times faster
# setup:
__version__ = "1.1.12.004"
__version__ = "1.1.12.005"
# changelog should be viewed using print(analysis.__changelog__)
__changelog__ = """changelog:
1.1.12.005:
- fixed numba issues by removing numba from elo, glicko2 and trueskill
1.1.12.004:
- renamed gliko to glicko
1.1.12.003:
@@ -384,14 +386,12 @@ def regression(ndevice, inputs, outputs, args, loss = torch.nn.MSELoss(), _itera
return regressions
@jit(nopython=True)
def elo(starting_score, opposing_score, observed, N, K):
expected = 1/(1+10**((np.array(opposing_score) - starting_score)/N))
return starting_score + K*(np.sum(observed) - np.sum(expected))
@jit(forceobj=True)
def glicko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_rd, observations):
player = Glicko2(rating = starting_score, rd = starting_rd, vol = starting_vol)
@@ -400,7 +400,6 @@ def glicko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_
return (player.rating, player.rd, player.vol)
@jit(forceobj=True)
def trueskill(teams_data, observations): # teams_data is array of array of tuples ie. [[(mu, sigma), (mu, sigma), (mu, sigma)], [(mu, sigma), (mu, sigma), (mu, sigma)]]
team_ratings = []

Binary file not shown.

Binary file not shown.

View File

@@ -2,7 +2,7 @@ import setuptools
setuptools.setup(
name="analysis", # Replace with your own username
version="1.0.0.001",
version="1.0.0.002",
author="The Titan Scouting Team",
author_email="titanscout2022@gmail.com",
description="analysis package developed by Titan Scouting for The Red Alliance",