Skip to content

Commit

Permalink
produce combined csv
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Nov 2, 2024
1 parent cc09b6a commit 8255572
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions research/combine-reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

@dataclasses.dataclass
class Experiment:
avg_deviance: float
min_deviation: float
max_deviation: float
default_volatility: float
tau: float
first_advantage: float
rating_periods_per_day: float
avg_deviance: float

experiments = []

Expand All @@ -23,15 +23,16 @@ class Experiment:
min_deviation, max_deviation, default_volatility, tau, first_advantage, rating_periods_per_day, avg_deviance = line.split(",")
experiments.append(
Experiment(
avg_deviance=float(avg_deviance),
min_deviation=float(min_deviation),
max_deviation=float(max_deviation),
default_volatility=float(default_volatility),
tau=float(tau),
first_advantage=float(first_advantage),
rating_periods_per_day=float(rating_periods_per_day)))
rating_periods_per_day=float(rating_periods_per_day),
avg_deviance=float(avg_deviance)))

experiments.sort(key=lambda e: e.avg_deviance, reverse=True)

for experiment in experiments:
print(experiment)
print("min_deviation,max_deviation,default_volatility,tau,first_advantage,rating_periods_per_day,avg_deviance")
for ex in experiments:
print(f"{ex.min_deviation},{ex.max_deviation},{ex.default_volatility},{ex.tau},{ex.first_advantage},{ex.rating_periods_per_day},{ex.avg_deviance}")

0 comments on commit 8255572

Please sign in to comment.