-
Notifications
You must be signed in to change notification settings - Fork 5
/
hyperparameters.py
258 lines (247 loc) · 13 KB
/
hyperparameters.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# Generated by hyperparameter_tuning_analysis.py. Changes will be overwritten.
def get(dataset, method, values, default_value=None):
if dataset in values and method in values[dataset]:
result = values[dataset][method]
else:
result = default_value
return result
def get_hyperparameters_str(dataset, method):
return get(dataset, method, hyperparameters_str, "")
def get_hyperparameters_tuple(dataset, method):
return get(dataset, method, hyperparameters_tuple, None)
def get_hyperparameters_folder(dataset, method):
return get(dataset, method, hyperparameters_folder, None)
hyperparameters_str = {
"ucihar": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 60 --inv_alpha 0.0005 --inv_beta 2.5 --loss_weight 0.1",
"calda_xs_h": "--lr=0.00001 --similarity_weight=1 --max_positives=5 --max_negatives=10 --temperature=0.05",
},
"ucihhar": {
"none": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"upper": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 2.5 --loss_weight 0.3",
"calda_xs_h": "--lr=0.001 --similarity_weight=1 --max_positives=10 --max_negatives=20 --temperature=0.5",
},
"wisdm_ar": {
"none": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 60 --inv_alpha 0.0001 --inv_beta 2.25 --loss_weight 0.2",
"calda_xs_h": "--lr=0.0001 --similarity_weight=10 --max_positives=5 --max_negatives=10 --temperature=0.1",
},
"wisdm_at": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 2.5 --loss_weight 0.3",
"calda_xs_h": "--lr=0.00001 --similarity_weight=100 --max_positives=10 --max_negatives=20 --temperature=0.05",
},
"myo": {
"none": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.001 --similarity_weight=1 --max_positives=10 --max_negatives=20 --temperature=0.5",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 1 --loss_weight 0.1",
},
"ninapro_db5_like_myo_noshift": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.001 --similarity_weight=10 --max_positives=5 --max_negatives=20 --temperature=0.5",
"upper": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 1 --loss_weight 0.1",
},
"normal_n12_l3_inter0_intra1_5,0,0,0_sine": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.00001 --similarity_weight=1 --max_positives=5 --max_negatives=10 --temperature=0.05",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
},
"normal_n12_l3_inter2_intra1_5,0,0,0_sine": {
"none": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.001 --similarity_weight=100 --max_positives=5 --max_negatives=20 --temperature=0.05",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 1 --loss_weight 0.1",
},
"normal_n12_l3_inter2_intra1_0,0.5,0,0_sine": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.00001 --similarity_weight=10 --max_positives=5 --max_negatives=10 --temperature=0.1",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.0001 --train_source_batch_size 60 --inv_alpha 0.001 --inv_beta 2 --loss_weight 0.1",
},
"normal_n12_l3_inter1_intra2_0,0,5,0_sine": {
"none": "--lr=0.001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.001 --similarity_weight=10 --max_positives=10 --max_negatives=40 --temperature=0.5",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.001 --train_source_batch_size 30 --inv_alpha 0.0001 --inv_beta 1 --loss_weight 0.1",
},
"normal_n12_l3_inter1_intra2_0,0,0,0.5_sine": {
"none": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"codats": "--lr=0.0001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"calda_xs_h": "--lr=0.00001 --similarity_weight=100 --max_positives=10 --max_negatives=20 --temperature=0.1",
"upper": "--lr=0.00001 --similarity_weight=0 --max_positives=1 --max_negatives=1 --temperature=0",
"can": "--base_lr 0.0001 --train_source_batch_size 30 --inv_alpha 0.001 --inv_beta 1.5 --loss_weight 0.3",
},
}
hyperparameters_tuple = {
"ucihar": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 60, 0.0005, 2.5, 0.1],
"calda_xs_h": [1e-05, 1.0, 5, 10, 0.05, 0, 0, 0, 0, 0],
},
"ucihhar": {
"none": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"upper": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 2.5, 0.3],
"calda_xs_h": [0.001, 1.0, 10, 20, 0.5, 0, 0, 0, 0, 0],
},
"wisdm_ar": {
"none": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 60, 0.0001, 2.25, 0.2],
"calda_xs_h": [0.0001, 10.0, 5, 10, 0.1, 0, 0, 0, 0, 0],
},
"wisdm_at": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 2.5, 0.3],
"calda_xs_h": [1e-05, 100.0, 10, 20, 0.05, 0, 0, 0, 0, 0],
},
"myo": {
"none": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [0.001, 1.0, 10, 20, 0.5, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 1, 0.1],
},
"ninapro_db5_like_myo_noshift": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [0.001, 10.0, 5, 20, 0.5, 0, 0, 0, 0, 0],
"upper": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 1, 0.1],
},
"normal_n12_l3_inter0_intra1_5,0,0,0_sine": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [1e-05, 1.0, 5, 10, 0.05, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
},
"normal_n12_l3_inter2_intra1_5,0,0,0_sine": {
"none": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [0.001, 100.0, 5, 20, 0.05, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 1, 0.1],
},
"normal_n12_l3_inter2_intra1_0,0.5,0,0_sine": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [1e-05, 10.0, 5, 10, 0.1, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.0001, 60, 0.001, 2, 0.1],
},
"normal_n12_l3_inter1_intra2_0,0,5,0_sine": {
"none": [0.001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [0.001, 10.0, 10, 40, 0.5, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.001, 30, 0.0001, 1, 0.1],
},
"normal_n12_l3_inter1_intra2_0,0,0,0.5_sine": {
"none": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"codats": [0.0001, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"calda_xs_h": [1e-05, 100.0, 10, 20, 0.1, 0, 0, 0, 0, 0],
"upper": [1e-05, 0, 1, 1, 0, 0, 0, 0, 0, 0],
"can": [0.0001, 30, 0.001, 1.5, 0.3],
},
}
hyperparameters_folder = {
"ucihar": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.0001_w0_p1_n1_t0",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb60_a0.0005_b2.5_w0.1",
"calda_xs_h": "lr0.00001_w1_p5_n10_t0.05",
},
"ucihhar": {
"none": "lr0.001_w0_p1_n1_t0",
"codats": "lr0.001_w0_p1_n1_t0",
"upper": "lr0.001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b2.5_w0.3",
"calda_xs_h": "lr0.001_w1_p10_n20_t0.5",
},
"wisdm_ar": {
"none": "lr0.001_w0_p1_n1_t0",
"codats": "lr0.0001_w0_p1_n1_t0",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb60_a0.0001_b2.25_w0.2",
"calda_xs_h": "lr0.0001_w10_p5_n10_t0.1",
},
"wisdm_at": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.00001_w0_p1_n1_t0",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b2.5_w0.3",
"calda_xs_h": "lr0.00001_w100_p10_n20_t0.05",
},
"myo": {
"none": "lr0.0001_w0_p1_n1_t0",
"codats": "lr0.001_w0_p1_n1_t0",
"calda_xs_h": "lr0.001_w1_p10_n20_t0.5",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b1_w0.1",
},
"ninapro_db5_like_myo_noshift": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.001_w0_p1_n1_t0",
"calda_xs_h": "lr0.001_w10_p5_n20_t0.5",
"upper": "lr0.0001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b1_w0.1",
},
"normal_n12_l3_inter0_intra1_5,0,0,0_sine": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.00001_w0_p1_n1_t0",
"calda_xs_h": "lr0.00001_w1_p5_n10_t0.05",
"upper": "lr0.00001_w0_p1_n1_t0",
},
"normal_n12_l3_inter2_intra1_5,0,0,0_sine": {
"none": "lr0.0001_w0_p1_n1_t0",
"codats": "lr0.00001_w0_p1_n1_t0",
"calda_xs_h": "lr0.001_w100_p5_n20_t0.05",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b1_w0.1",
},
"normal_n12_l3_inter2_intra1_0,0.5,0,0_sine": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.0001_w0_p1_n1_t0",
"calda_xs_h": "lr0.00001_w10_p5_n10_t0.1",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.0001_sb60_a0.001_b2_w0.1",
},
"normal_n12_l3_inter1_intra2_0,0,5,0_sine": {
"none": "lr0.001_w0_p1_n1_t0",
"codats": "lr0.0001_w0_p1_n1_t0",
"calda_xs_h": "lr0.001_w10_p10_n40_t0.5",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.001_sb30_a0.0001_b1_w0.1",
},
"normal_n12_l3_inter1_intra2_0,0,0,0.5_sine": {
"none": "lr0.00001_w0_p1_n1_t0",
"codats": "lr0.0001_w0_p1_n1_t0",
"calda_xs_h": "lr0.00001_w100_p10_n20_t0.1",
"upper": "lr0.00001_w0_p1_n1_t0",
"can": "lr0.0001_sb30_a0.001_b1.5_w0.3",
},
}