Esempio n. 1
0
output = 'results/' + exp_name + '.csv'
l_scores = []

for args['set_id'] in range(1, 11):
    for args['n'] in [1000, 5000]:
        for args['citcio'] in [False, True]:
            for args['n_epochs'] in [10, 402]:
                for args['p'] in [5, 100]:
                    for args['prop_miss'] in [0, 0.1, 0.3]:
                        for args['model'] in ["dlvm", "lrmf"]:
                            t0 = time.time()
                            score = [ihdp_cevae(**args)]
                            args['time'] = int(time.time() - t0)
                            l_scores.append(
                                np.concatenate((list(args.values()), score)))
                            print('ihdp 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('IHDP with: ' + exp_name + ' succesfully ended.')
print('*' * 20)
Esempio n. 2
0
#range_sig_prior = [0.1, 1, 10]
#range_n_epochs = [10, 200, 600]

exp_name = 'ihdp_mi'
#

args['m'] = 10
print('starting exp: ' + exp_name)
l_tau = ['tau_dr', 'tau_ols', 'tau_ols_ps']
output = 'results/2019-10-25_' + exp_name + '.csv'
l_scores = []

for args['set_id'] in range(1, 11):
    for args['prop_miss'] in range_prop_miss:
        t0 = time.time()
        score = ihdp_mi(**args)
        args['time'] = int(time.time() - t0)
        l_scores.append(np.concatenate((list(args.values()), score)))
        print('ihdp_mi 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('IHDP with: ' + exp_name + ' succesfully ended.')
print('*' * 20)
Esempio n. 3
0
import numpy as np
import pandas as pd
import time

from main_ihdp import ihdp_miwae_save
from config_ihdp import args

# set here params 
range_prop_miss = [0.1, 0.3, 0, 0.5]

exp_name = 'ihdp_save_12.1_11'
# 
    
print('starting ihdp: ' + exp_name)

args_col = list(set(args.keys()) - set(['set_id']))
args = {k: args[k] for k in args_col}
args['set_id_range'] = range(1,2)
args['sig_prior'] = 1
args['d_miwae'] = 5
args['n_epochs'] = 100

score_data = pd.DataFrame()
for args['prop_miss'] in range_prop_miss:
    if args['prop_miss'] == 0.5:
        args['sig_prior'] = 0.1
        args['d_miwae'] = 5
    t0 = time.time()
    score = ihdp_miwae_save(out_folder = 'results/',**args)
    args['time'] = int(time.time() - t0)
    print('ihdp with ', args, '(',score,')')
Esempio n. 4
0
range_sig_prior = [0.1, 1, 10]
range_n_epochs = [100,] #[10,]# 400]
range_d_miwae = [5, 10, 100]

exp_name = 'ihdp_cv_10.2_11'
# 


print('starting ihdp: ' + exp_name)

l_elbo = ['d_miwae', 'sig_prior', 'k', 'elbo']

output = 'results/'+exp_name+'.csv'
l_scores = []

args_col = list(set(args.keys()) - set(['sig_prior','d_miwae']))
args = {k: args[k] for k in args_col}
args['k_fold'] = 5

for args['set_id'] in range(1,1001, 100):
    for args['prop_miss'] in range_prop_miss:
        for args['add_wy'] in [False]:#, True]:
            for args['n_epochs'] in range_n_epochs:
                t0 = time.time()
                score = ihdp_miwae_cv(**args, sig_prior_list = range_sig_prior, d_miwae_list = range_d_miwae)
                args['time'] = int(time.time() - t0)
                for i in range(len(score)):
                    l_scores.append(np.concatenate((list(args.values()),score[i])))
                print('ihdp with ', args)
                print('........... DONE')
                print('in ', int(args["time"]) , ' s  \n\n')
Esempio n. 5
0
# set here params
range_prop_miss = [
    0.5,
]  #[0.1, 0.3, 0]

exp_name = 'ihdp_08.2_11_cevae'
#

print('starting ihdp: ' + exp_name)

l_tau = ['tau_cevae']

output = 'results/' + exp_name + '.csv'
l_scores = []
args['n_epochs'] = 100
args_col = list(set(args.keys()) - set(['set_id_range']))
args = {k: args[k] for k in args_col}

for args['set_id'] in range(1, 1001):
    for args['prop_miss'] in range_prop_miss:

        t0 = time.time()
        score = ihdp_cevae(**args)
        args['time'] = int(time.time() - t0)
        l_scores.append(np.concatenate((list(args.values()), [score])))
        print('ihdp 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')