lags_i = np.arange(0, 120, 10) list_of_fc = [ fcev( path_data=ERA_q65tail, precur_aggr=precur_aggr, use_fold=use_fold, start_end_TVdate=None, stat_model=( 'logitCV', { 'Cs': 10, #np.logspace(-4,1,10) 'class_weight': { 0: 1, 1: 1 }, 'scoring': 'neg_brier_score', 'penalty': 'l2', 'solver': 'lbfgs', 'max_iter': 100, 'kfold': 5, 'seed': 2 }), kwrgs_pp={ 'add_autocorr': False, 'normalize': 'datesRV' }, dataset='', keys_d='CPPA+sm'), fcev( path_data=ERA_q65tail, precur_aggr=precur_aggr,
kwrgs_events = kwrgs_events precur_aggr = 15 add_autocorr = False use_fold = None n_boot = 5 lags_i = np.array([0, 10, 15, 20, 25, 30]) start_end_TVdate = None # ('7-04', '8-22') list_of_fc = [ fcev(path_data=ERA_data, precur_aggr=precur_aggr, use_fold=use_fold, start_end_TVdate=None, stat_model=logitCV, kwrgs_pp={ 'add_autocorr': add_autocorr, 'normalize': 'datesRV' }, dataset=f'CPPA vs PEP', keys_d='PEP', n_cpu=n_cpu) ] # fcev(path_data=ERA_data, precur_aggr=precur_aggr, # use_fold=use_fold, start_end_TVdate=None, # stat_model=logitCV, # kwrgs_pp={'add_autocorr':add_autocorr, 'normalize':'datesRV'}, # dataset=f'CPPA vs PEP', # keys_d='CPPA', # n_cpu=n_cpu), # fcev(path_data=ERA_data, precur_aggr=precur_aggr, # use_fold=use_fold, start_end_TVdate=None,
import wrapper_PCMCI as wPCMCI except ImportError as e: print('Not able to load in Tigramite modules, to enable causal inference ' 'features, install Tigramite from ' 'https://github.com/jakobrunge/tigramite/') # remove created output folders shutil.rmtree(rg.path_outsub1) shutil.rmtree(os.path.join(main_dir, 'data', 'preprocessed')) raise(e) from class_fc import fcev import valid_plots as dfplots if __name__ == '__main__': fc = fcev(path_data=path_df_data, n_cpu=1, causal=True) fc.get_TV(kwrgs_events=None) fc.fit_models(lead_max=35) dict_experiments = {} fc.perform_validation(n_boot=100, blocksize='auto', threshold_pred=(1.5, 'times_clim')) dict_experiments['test'] = fc.dict_sum working_folder, filename = fc._print_sett(list_of_fc=[fc]) store=True dict_all = dfplots.merge_valid_info([fc], store=store) if store: dict_merge_all = functions_pp.load_hdf5(filename) kwrgs = {'wspace':0.25, 'col_wrap':3} #, 'threshold_bin':fc.threshold_pred}
ERA_data = data_dir + '/CPPA_ERA5_14-05-20_08hr_lag_0_c378f.h5' kwrgs_events = {'event_percentile': 'std'} # = mean + std, see class_RV.Ev_threshold kwrgs_events = kwrgs_events precur_aggr = 1 use_fold = None n_boot = 2000 lags_i = np.array([0, 10, 15, 20 , 25, 30]) start_end_TVdate = ('6-24', '8-22') list_of_fc = [fcev(path_data=ERA_data, precur_aggr=precur_aggr, use_fold=use_fold, start_end_TVdate=start_end_TVdate, stat_model=logitCV, kwrgs_pp={'add_autocorr':False, 'normalize':'datesRV'}, dataset=f'ERA-5', keys_d='PEP', n_cpu=n_cpu), fcev(path_data=ERA_data, precur_aggr=precur_aggr, use_fold=use_fold, start_end_TVdate=start_end_TVdate, stat_model=logitCV, kwrgs_pp={'add_autocorr':False, 'normalize':'datesRV'}, dataset=f'ERA-5', keys_d='CPPA', n_cpu=n_cpu), fcev(path_data=EC_data, precur_aggr=precur_aggr, use_fold=use_fold, start_end_TVdate=start_end_TVdate, stat_model=logitCV, kwrgs_pp={'add_autocorr':False, 'normalize':'datesRV'}, dataset=f'EC-Earth', keys_d='PEP', n_cpu=n_cpu), fcev(path_data=EC_data, precur_aggr=precur_aggr,