mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-26 09:39:10 +00:00
maybe working
This commit is contained in:
parent
283140094f
commit
eb8914aa26
@ -1,9 +1,11 @@
|
|||||||
2020ilch
|
2020ilch
|
||||||
balls-blocked,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
balls-blocked,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
balls-collected,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
balls-collected,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
balls-lower,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
balls-lower-teleop,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
|
balls-lower-auto,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
balls-started,basic_stats,historical_analyss,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
balls-started,basic_stats,historical_analyss,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
balls-upper,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
balls-upper-teleop,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
|
balls-upper-auto,basic_stats,historical_analysis,regression_linear,regression_logarithmic,regression_exponential,regression_polynomial,regression_sigmoidal
|
||||||
wheel-mechanism
|
wheel-mechanism
|
||||||
low-balls
|
low-balls
|
||||||
high-balls
|
high-balls
|
||||||
|
|
@ -114,7 +114,7 @@ def main():
|
|||||||
print(" finished tests")
|
print(" finished tests")
|
||||||
|
|
||||||
print(" running metrics")
|
print(" running metrics")
|
||||||
metrics = metricsloop(tbakey, apikey, competition, previous_time)
|
metricsloop(tbakey, apikey, competition, previous_time)
|
||||||
print(" finished metrics")
|
print(" finished metrics")
|
||||||
|
|
||||||
print(" running pit analysis")
|
print(" running pit analysis")
|
||||||
@ -176,16 +176,12 @@ def simplestats(data, test):
|
|||||||
if(test == "regression_sigmoidal"):
|
if(test == "regression_sigmoidal"):
|
||||||
return an.regression(list(range(len(data))), data, ['sig'])
|
return an.regression(list(range(len(data))), data, ['sig'])
|
||||||
|
|
||||||
def push_to_database(apikey, competition, results, metrics, pit):
|
def push_to_database(apikey, competition, results, pit):
|
||||||
|
|
||||||
for team in results:
|
for team in results:
|
||||||
|
|
||||||
d.push_team_tests_data(apikey, competition, team, results[team])
|
d.push_team_tests_data(apikey, competition, team, results[team])
|
||||||
|
|
||||||
for team in temp_vector:
|
|
||||||
|
|
||||||
d.push_team_metrics_data(apikey, competition, team, temp_vector[team])
|
|
||||||
|
|
||||||
for variable in pit:
|
for variable in pit:
|
||||||
|
|
||||||
d.push_team_pit_data(apikey, competition, variable, pit[variable])
|
d.push_team_pit_data(apikey, competition, variable, pit[variable])
|
||||||
@ -202,11 +198,11 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
|
|||||||
red = {}
|
red = {}
|
||||||
blu = {}
|
blu = {}
|
||||||
|
|
||||||
|
for match in matches:
|
||||||
|
|
||||||
red = load_metrics(apikey, competition, match, "red")
|
red = load_metrics(apikey, competition, match, "red")
|
||||||
blu = load_metrics(apikey, competition, match, "blue")
|
blu = load_metrics(apikey, competition, match, "blue")
|
||||||
|
|
||||||
for match in matches:
|
|
||||||
|
|
||||||
elo_red_total = 0
|
elo_red_total = 0
|
||||||
elo_blu_total = 0
|
elo_blu_total = 0
|
||||||
|
|
||||||
@ -279,6 +275,14 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
|
|||||||
blu[team]["gl2"]["rd"] = blu[team]["gl2"]["rd"] + blu_gl2_delta["rd"]
|
blu[team]["gl2"]["rd"] = blu[team]["gl2"]["rd"] + blu_gl2_delta["rd"]
|
||||||
blu[team]["gl2"]["vol"] = blu[team]["gl2"]["vol"] + blu_gl2_delta["vol"]
|
blu[team]["gl2"]["vol"] = blu[team]["gl2"]["vol"] + blu_gl2_delta["vol"]
|
||||||
|
|
||||||
|
temp_vector = {}
|
||||||
|
temp_vector.update(red)
|
||||||
|
temp_vector.update(blu)
|
||||||
|
|
||||||
|
for team in temp_vector:
|
||||||
|
|
||||||
|
d.push_team_metrics_data(apikey, competition, team, temp_vector[team])
|
||||||
|
|
||||||
""" not functional for now
|
""" not functional for now
|
||||||
red_trueskill = []
|
red_trueskill = []
|
||||||
blu_trueskill = []
|
blu_trueskill = []
|
||||||
@ -305,11 +309,6 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return_vector.update(red)
|
|
||||||
return_vector.update(blue)
|
|
||||||
|
|
||||||
return return_vector
|
|
||||||
|
|
||||||
def load_metrics(apikey, competition, match, group_name):
|
def load_metrics(apikey, competition, match, group_name):
|
||||||
|
|
||||||
group = {}
|
group = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user