-
Notifications
You must be signed in to change notification settings - Fork 4
/
paper_3_2_cumregret_wrt_M.py
62 lines (46 loc) · 1.35 KB
/
paper_3_2_cumregret_wrt_M.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
52
53
54
55
56
57
58
59
60
61
62
import numpy as np
import matplotlib.pyplot as plt
import collections
import os
import logging
import pickle
import json
import time
from tqdm import tqdm
import importlib
from environment import *
from simulations import *
from algorithms import *
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
save_folder = "../results_plots/paper_3_2_cumregret_wrt_M"
n_exps = 50
algo_to_plot = [
#"Lugosi-Mehrabian 1"
"Lugosi-Mehrabian 2",
"SIC-MMAB2",
"EC-SIC",
#"SelfishKLUCB",
#"Bubeck-Budzinski",
"Rnd-SelfishKLUCB",
#"MCTopM",
#"SIC-MMAB",
]
K = 10
mu = list(np.round(np.linspace(0.9,0.1,K),3))
wrt_M_dict_given_list = {10:[mu]}
dict_K_T = {10: 2000000}
for M in range(1,K):
mult_sim = MultipleSimulations(M=M,
dict_K_T=dict_K_T,
dict_given_list=wrt_M_dict_given_list
)
mult_sim.run_save_fig(n_exps=n_exps,
list_algo_to_plot=algo_to_plot,
skip_existing_sim=True)
## DISPLAY
plot_regret_wrt_M(mu=mu, K=K, T=dict_K_T[K],
list_algo=algo_to_plot,
list_of_M=[i for i in range(1,10)],
save_folder=save_folder,
)