analysis pkg 1.0.0.001

This commit is contained in:
ltcptgeneral 2020-03-04 17:54:30 -06:00
parent dd3d84f46a
commit 0d120e572f
7 changed files with 21 additions and 11 deletions

View File

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

View File

@ -7,10 +7,12 @@
# current benchmark of optimization: 1.33 times faster # current benchmark of optimization: 1.33 times faster
# setup: # setup:
__version__ = "1.1.12.003" __version__ = "1.1.12.004"
# changelog should be viewed using print(analysis.__changelog__) # changelog should be viewed using print(analysis.__changelog__)
__changelog__ = """changelog: __changelog__ = """changelog:
1.1.12.004:
- renamed gliko to glicko
1.1.12.003: 1.1.12.003:
- removed depreciated code - removed depreciated code
1.1.12.002: 1.1.12.002:
@ -235,7 +237,7 @@ __all__ = [
'histo_analysis', 'histo_analysis',
'regression', 'regression',
'elo', 'elo',
'gliko2', 'glicko2',
'trueskill', 'trueskill',
'RegressionMetrics', 'RegressionMetrics',
'ClassificationMetrics', 'ClassificationMetrics',
@ -249,7 +251,7 @@ __all__ = [
'random_forest_classifier', 'random_forest_classifier',
'random_forest_regressor', 'random_forest_regressor',
'Regression', 'Regression',
'Gliko2', 'Glicko2',
# all statistics functions left out due to integration in other functions # all statistics functions left out due to integration in other functions
] ]
@ -390,9 +392,9 @@ def elo(starting_score, opposing_score, observed, N, K):
return starting_score + K*(np.sum(observed) - np.sum(expected)) return starting_score + K*(np.sum(observed) - np.sum(expected))
@jit(forceobj=True) @jit(forceobj=True)
def gliko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_rd, observations): def glicko2(starting_score, starting_rd, starting_vol, opposing_score, opposing_rd, observations):
player = Gliko2(rating = starting_score, rd = starting_rd, vol = starting_vol) player = Glicko2(rating = starting_score, rd = starting_rd, vol = starting_vol)
player.update_player([x for x in opposing_score], [x for x in opposing_rd], observations) player.update_player([x for x in opposing_score], [x for x in opposing_rd], observations)
@ -852,7 +854,7 @@ class Regression:
optim.step() optim.step()
return kernel return kernel
class Gliko2: class Glicko2:
_tau = 0.5 _tau = 0.5

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -163,6 +163,14 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
red = load_metrics(apikey, competition, matches, "red") red = load_metrics(apikey, competition, matches, "red")
blu = load_metrics(apikey, competition, matches, "blue") blu = load_metrics(apikey, competition, matches, "blue")
elo_red_total = 0
elo_blu_total = 0
gl2_red_total = 0
gl2_blu_total + 0
for team in red:
return return
def load_metrics(apikey, competition, matches, group_name): def load_metrics(apikey, competition, matches, group_name):
@ -177,7 +185,7 @@ def load_metrics(apikey, competition, matches, group_name):
if d.get_team_metrics_data(apikey, competition, team) == None: if d.get_team_metrics_data(apikey, competition, team) == None:
elo = {"score": 1500, "N": 1500, "K": 1500} elo = {"score": 1500}
gl2 = {"score": 1500, "rd": 250, "vol": 0.06} gl2 = {"score": 1500, "rd": 250, "vol": 0.06}
ts = {"mu": 25, "sigma": 25/3} ts = {"mu": 25, "sigma": 25/3}
@ -202,8 +210,8 @@ testing()
Metrics Defaults: Metrics Defaults:
elo starting score = 1500 elo starting score = 1500
elo N = 1500 elo N = 400
elo K = 32 elo K = 24
gl2 starting score = 1500 gl2 starting score = 1500
gl2 starting rd = 350 gl2 starting rd = 350