-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexp_cevae.py
47 lines (36 loc) · 1.34 KB
/
exp_cevae.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
import numpy as np
import pandas as pd
import time
from main import exp_cevae
from config import args
range_seed = np.arange(2)
range_n = [1000]
range_p = [20, 100, 1000]
range_prop_miss = [0.1, 0.3, 0]
range_n_epochs = [10, 200, 600]
exp_name = 'exp_cevae_0'
#
print('starting exp: ' + exp_name)
l_tau = ['tau_dr', 'tau_dr_ps']
output = 'results/'+exp_name+'.csv'
l_scores = []
for args['model'] in ["dlvm","lrmf"]:
for args['seed'] in range_seed:
for args['n_epochs'] in range_n_epochs:
for args['prop_miss'] in range_prop_miss:
for args['n'] in range_n:
for args['p'] in range_p:
t0 = time.time()
score = exp_cevae(**args)
args['time'] = int(time.time() - t0)
l_scores.append(np.concatenate((list(args.values()),score)))
print('exp with ', args)
print('........... DONE')
print('in ', int(args["time"]) , ' s \n\n')
score_data = pd.DataFrame(l_scores, columns=list(args.keys()) + l_tau)
score_data.to_csv(output + '_temp')
print('saving ' +exp_name + 'at: ' + output)
score_data.to_csv(output)
print('*'*20)
print('Exp: '+ exp_name+' succesfully ended.')
print('*'*20)