"type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]] } # 1 Classic for cir_var in cir_group: var_desc[cir_var] = { "type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]] } _, a = cxval_test(df, class_var, var_desc, 100, seed=1) rmse_a.append(a) # 2 Our for cir_var in cir_group: var_desc[cir_var] = { "type": "cir", "method": "classic", "bounds": [[-np.inf, np.inf]] } _, b = cxval_test(df, class_var, var_desc,
rmse_a, rmse_b, rmse_c = [], [], [] for name in names: df = pd.read_csv("./datasets/{}_clean.csv".format(name)) var_desc = {} for lin_var in lin_group: var_desc[lin_var] = {"type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]]} # 1 Classic for cir_var in cir_group: var_desc[cir_var] = {"type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]]} _, a = cxval_test(df, class_var, var_desc, 100, seed=1) rmse_a.append(a) # 2 Our for cir_var in cir_group: var_desc[cir_var] = {"type": "cir", "method": "classic", "bounds": [[-np.inf, np.inf]]} _, b = cxval_test(df, class_var, var_desc, 100, seed=1) rmse_b.append(b) # 3 Lund for cir_var in cir_group: var_desc[cir_var] = {"type": "cir", "method": "subset", "bounds": [[-np.inf, np.inf]]} _, c = cxval_test(df, class_var, var_desc, 100, seed=1) rmse_c.append(c)
for bin_size in [50, 100, 250, 500, 1000, 2500]: rmse_a, rmse_b, rmse_c = [], [], [] time_a, time_b, time_c = [], [], [] df = pd.read_csv("./datasets/{}_clean.csv".format(name)) var_desc = {} for lin_var in lin_group: var_desc[lin_var] = {"type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]]} # 1 Classic for cir_var in cir_group: var_desc[cir_var] = {"type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]]} time1 = time.time() _, a = cxval_test(df, class_var, var_desc, bin_size, seed=1) time_a.append(time.time()-time1) rmse_a.append(a) # 2 Our for cir_var in cir_group: var_desc[cir_var] = {"type": "cir", "method": "classic", "bounds": [[-np.inf, np.inf]]} time1 = time.time() _, b = cxval_test(df, class_var, var_desc, bin_size, seed=1) time_b.append(time.time()-time1) rmse_b.append(b) # 3 Lund for cir_var in cir_group: var_desc[cir_var] = {"type": "cir", "method": "subset", "bounds": [[-np.inf, np.inf]]}
var_desc[lin_var] = { "type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]] } # 1 Classic for cir_var in cir_group: var_desc[cir_var] = { "type": "lin", "method": "classic", "bounds": [[-np.inf, np.inf]] } time1 = time.time() _, a = cxval_test(df, class_var, var_desc, bin_size, seed=1) time_a.append(time.time() - time1) rmse_a.append(a) # 2 Our for cir_var in cir_group: var_desc[cir_var] = { "type": "cir", "method": "classic", "bounds": [[-np.inf, np.inf]] } time1 = time.time() _, b = cxval_test(df, class_var, var_desc, bin_size, seed=1) time_b.append(time.time() - time1) rmse_b.append(b)