add option to scoring to return values before averaging

This commit is contained in:
Connor Olding 2023-05-19 20:56:03 -07:00
parent 9618061bd3
commit a0e46871e6

View file

@ -29,7 +29,7 @@ def prune_results(results, multiple, _check=False):
return results
def perform_another_experimental_scoring_method(results):
def perform_another_experimental_scoring_method(results, many_raw=False):
if len(results) and len(something := next(iter(results.values()))[0]) == 3:
history_length = len(something[2])
each = {}
@ -39,7 +39,7 @@ def perform_another_experimental_scoring_method(results):
l = {k: [(res[2][i], res[1]) for res in v] for k, v in results.items()}
for k, v in perform_another_experimental_scoring_method(l).items():
each.setdefault(k, []).append(v)
return {k: sum(v) / len(v) for k, v in each.items()}
return each if many_raw else {k: sum(v) / len(v) for k, v in each.items()}
new_results = {}
all_opt_names = set()