-
Notifications
You must be signed in to change notification settings - Fork 3
/
process_results.py
51 lines (37 loc) · 1.3 KB
/
process_results.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import pickle
with open("results_notime.pkl", "rb") as f:
res_notime = pickle.load(f)
with open("results_time.pkl", "rb") as f:
res_time = pickle.load(f)
regrets_notime = [i["regrets"][0] for i in res_notime]
regrets_notime
regrets_time = [i["regrets"][0] for i in res_time]
regrets_time
len(set(res[0]["best_set_truth"]) - set(res[0]["best_set_oim"])) / len(
res[0]["best_set_truth"])
#%%
with open("results_notime_5_2.pkl", "rb") as f:
res_notime = pickle.load(f)
with open("results_time_5_2.pkl", "rb") as f:
res_time = pickle.load(f)
regrets_notime = [i["regret_t"] for i in res_notime]
regrets_time = [i["regret_t"] for i in res_time]
print(f"results_time = {regrets_time}\nresults_notime = {regrets_notime}")
import numpy as np
np.array(regrets_notime) - np.array(regrets_time)
#%%
with open("eps0.5-csigmatest/results_eps0.5_sigma0.01_c0.01.pkl", "rb") as f:
test = pickle.load(f)
test
#%%
import os
with open(
os.path.join("eps0.4-2pparamsTrue", "results_eps0.4_sigma4_c0.1.pkl"),
"rb") as f:
res_time = pickle.load(f)
with open(
os.path.join("eps0.4-2pparamsFalse", "results_eps0.4_sigma4_c0.1.pkl"),
"rb") as f:
res_notime = pickle.load(f)
regrets_notime = [i["regret_t"] for i in res_notime]
regrets_time = [i["regret_t"] for i in res_time]