|
string | test.__version__ = '1.0' |
|
string | test.__author__ = 'Saul Alonso-Monsalve' |
|
string | test.__email__ = "saul.alonso.monsalve@cern.ch" |
|
| test.stream |
|
| test.stdout |
|
| test.level |
|
| test.config = configparser.ConfigParser() |
|
| test.SEED = int(config['random']['seed']) |
|
| test.SHUFFLE = ast.literal_eval(config['random']['shuffle']) |
|
| test.IMAGES_PATH = config['images']['path'] |
|
| test.VIEWS = int(config['images']['views']) |
|
| test.PLANES = int(config['images']['planes']) |
|
| test.CELLS = int(config['images']['cells']) |
|
| test.STANDARDIZE = ast.literal_eval(config['images']['standardize']) |
|
| test.DATASET_PATH = config['dataset']['path'] |
|
| test.PARTITION_PREFIX = config['dataset']['partition_prefix'] |
|
| test.LABELS_PREFIX = config['dataset']['labels_prefix'] |
|
| test.CHECKPOINT_PATH = config['model']['checkpoint_path'] |
|
| test.CHECKPOINT_PREFIX = config['model']['checkpoint_prefix'] |
|
| test.CHECKPOINT_SAVE_MANY = ast.literal_eval(config['model']['checkpoint_save_many']) |
|
| test.CHECKPOINT_SAVE_BEST_ONLY = ast.literal_eval(config['model']['checkpoint_save_best_only']) |
|
| test.PRINT_SUMMARY = ast.literal_eval(config['model']['print_summary']) |
|
| test.BRANCHES = ast.literal_eval(config['model']['branches']) |
|
| test.PARALLELIZE = ast.literal_eval(config['model']['parallelize']) |
|
| test.OUTPUTS = int(config['model']['outputs']) |
|
| test.OUTPUT_PATH = config['test']['output_path'] |
|
| test.OUTPUT_PREFIX = config['test']['output_prefix'] |
|
| test.CUT_NUE = float(config['test']['cut_nue']) |
|
| test.CUT_NUMU = float(config['test']['cut_numu']) |
|
| test.CUT_NUTAU = float(config['test']['cut_nutau']) |
|
| test.CUT_NC = float(config['test']['cut_nc']) |
|
| test.TEST_BATCH_SIZE = int(config['test']['batch_size']) |
|
list | test.test_values = [] |
|
dictionary | test.TEST_PARAMS |
|
| test.partition = pickle.load(partition_file) |
|
| test.labels = pickle.load(labels_file) |
|
| test.prediction_generator = DataGenerator(**TEST_PARAMS).generate(labels, partition['test'], False) |
|
list | test.files = [f for f in os.listdir(CHECKPOINT_PATH) if os.path.isfile(os.path.join(CHECKPOINT_PATH, f))] |
|
| test.reverse |
|
| test.r = re.compile(CHECKPOINT_PREFIX[1:] + '-.*-.*.h5') |
|
| test.model |
|
list | test.is_antineutrino_target_names = ['neutrino', 'antineutrino', 'NULL'] |
|
list | test.flavour_target_names = ['CC Numu', 'CC Nue', 'CC Nutau', 'NC'] |
|
list | test.interaction_target_names = ['CC QE', 'CC Res', 'CC DIS', 'CC Other', 'NULL'] |
|
list | test.categories_target_names |
|
list | test.protons_target_names = ['0', '1', '2', '>2'] |
|
list | test.pions_target_names = ['0', '1', '2', '>2'] |
|
list | test.pizeros_target_names = ['0', '1', '2', '>2'] |
|
list | test.neutrons_target_names = ['0', '1', '2', '>2'] |
|
| test.Y_pred |
|
| test.y_pred_categories = np.argmax(Y_pred, axis=1).reshape((Y_pred.shape[0], 1)) |
|
| test.Y_pred_flavour = np.zeros((Y_pred.shape[0], 4)) |
|
| test.y_test_categories = np.array([12 if aux['y_value'] == 13 else aux['y_value'] for aux in test_values]).reshape(y_pred_categories.shape) |
|
| test.y_test_flavour = np.zeros(y_test_categories.shape, dtype=int) |
|
| test.p = Y_pred[i] |
|
| test.y_pred_flavour = np.argmax(Y_pred_flavour, axis=1) |
|
| test.flavour_conf_matrix = confusion_matrix(y_pred_flavour, y_test_flavour) |
|
| test.categories_conf_matrix = confusion_matrix(y_pred_categories, y_test_categories) |
|
| test.weighted_conf_matrix = np.zeros((4,4), dtype='float32') |
|
| test.cut_weighted_conf_matrix = np.zeros((4,4), dtype='float32') |
|
| test.pred_flavour = int(y_pred_flavour[sample]) |
|
| test.test_flavour = int(y_test_flavour[sample]) |
|
| test.weight = test_values[sample]['fEventWeight'] |
|
string | test.float_formatter = lambdax:"%.4f" |
|
| test.formatter |
|
| test.purity_conf_matrix = np.copy(cut_weighted_conf_matrix) |
|
| test.row_sum = np.sum(purity_conf_matrix[i]) |
|
| test.efficiency_conf_matrix = cut_weighted_conf_matrix.astype('float32')/np.add.reduce(weighted_conf_matrix) |
|
| test.y_pred_is_antineutrino = np.around(Y_pred[0]).reshape((Y_pred[0].shape[0], 1)).astype(int) |
|
| test.y_pred_interaction = np.argmax(Y_pred[2], axis=1).reshape((Y_pred[2].shape[0], 1)) |
|
| test.y_pred_protons = np.argmax(Y_pred[3], axis=1).reshape((Y_pred[3].shape[0], 1)) |
|
| test.y_pred_pions = np.argmax(Y_pred[4], axis=1).reshape((Y_pred[4].shape[0], 1)) |
|
| test.y_pred_pizeros = np.argmax(Y_pred[5], axis=1).reshape((Y_pred[5].shape[0], 1)) |
|
| test.y_pred_neutrons = np.argmax(Y_pred[6], axis=1).reshape((Y_pred[6].shape[0], 1)) |
|
| test.y_test_is_antineutrino = np.array([aux['y_value'][0] for aux in test_values]).reshape(y_pred_is_antineutrino.shape) |
|
| test.y_test_interaction = np.array([aux['y_value'][2] for aux in test_values]).reshape(y_pred_interaction.shape) |
|
| test.y_test_protons = np.array([aux['y_value'][3] for aux in test_values]).reshape(y_pred_protons.shape) |
|
| test.y_test_pions = np.array([aux['y_value'][4] for aux in test_values]).reshape(y_pred_pions.shape) |
|
| test.y_test_pizeros = np.array([aux['y_value'][5] for aux in test_values]).reshape(y_pred_pizeros.shape) |
|
| test.y_test_neutrons = np.array([aux['y_value'][6] for aux in test_values]).reshape(y_pred_neutrons.shape) |
|
| test.is_antineutrino_conf_matrix = confusion_matrix(y_pred_is_antineutrino, y_test_is_antineutrino) |
|
| test.interaction_conf_matrix = confusion_matrix(y_pred_interaction, y_test_interaction) |
|
| test.protons_conf_matrix = confusion_matrix(y_pred_protons, y_test_protons) |
|
| test.pions_conf_matrix = confusion_matrix(y_pred_pions, y_test_pions) |
|
| test.pizeros_conf_matrix = confusion_matrix(y_pred_pizeros, y_test_pizeros) |
|
| test.neutrons_conf_matrix = confusion_matrix(y_pred_neutrons, y_test_neutrons) |
|
dictionary | test.test_info |
|