negative_val_num = int(num_negative * VALIDATION_RATE)
negative_train_num = num_negative - negative_val_num
tpfiles = pfiles[:positive_train_num]
vpfiles = pfiles[positive_train_num:num_positive]
positive_train_indices = [i for i in range(positive_train_num)]
positive_val_indices = [i for i in range(positive_val_num)]
tnfiles = nfiles[:negative_train_num]
vnfiles = nfiles[negative_train_num:num_negative]
negative_train_indices = [i for i in range(negative_train_num)]
negative_val_indices = [i for i in range(negative_val_num)]
#negative_importances = 1000*np.ones(shape=[num_negative], dtype=float)
'''
files_lists = bt.filelist_training(pfilelist_path,
                                   nfilelist_path,
                                   luna_dir=luna_dir,
                                   luna_trainsets=luna_trainsets,
                                   luna_valsets=luna_valsets,
                                   slh_dir=None,
                                   valrate=VALIDATION_RATE,
                                   list_store_path=net_store_path)
tpfiles = files_lists['tpfiles']
vpfiles = files_lists['vpfiles']
tnfiles = files_lists['tnfiles']
vnfiles = files_lists['vnfiles']
positive_train_num = len(tpfiles)
positive_val_num = len(vpfiles)
negative_train_num = len(tnfiles)
negative_val_num = len(vnfiles)
#positive_train_num = 5
#negative_train_num = 50
#positive_val_num = 1
#negative_val_num = 10
Esempio n. 2
0
#positive_val_num = 1
positive_train_num = num_positive - positive_val_num
negative_val_num = int(num_negative * VALIDATION_RATE)
negative_train_num = num_negative - negative_val_num
tpfiles = pfiles[:positive_train_num]
vpfiles = pfiles[positive_train_num:num_positive]
tnfiles = nfiles[:negative_train_num]
vnfiles = nfiles[negative_train_num:num_negative]
#negative_importances = 1000*np.ones(shape=[num_negative], dtype=float)
'''
files_lists = bt.filelist_training(pfilelist_path,
                                   nfilelist_path,
                                   luna_dir="luna_cubes_56_overbound",
                                   luna_trainsets=[
                                       "subset0", "subset1", "subset2",
                                       "subset3", "subset4", "subset5",
                                       "subset6", "subset7", "subset8"
                                   ],
                                   luna_valsets=["subset9"],
                                   slh_dir="slh_cubes_56_overbound",
                                   valrate=VALIDATION_RATE,
                                   list_store_path=net_store_path)
tpfiles = files_lists['tpfiles']
vpfiles = files_lists['vpfiles']
tnfiles = files_lists['tnfiles']
vnfiles = files_lists['vnfiles']
positive_train_num = len(tpfiles)
positive_val_num = len(vpfiles)
negative_train_num = len(tnfiles)
negative_val_num = len(vnfiles)
#positive_train_num = 1
#negative_train_num = 1