umami package#

Subpackages#

Submodules#

umami.evaluate_model module#

Execution script for training model evaluations.

umami.evaluate_model.evaluate_model(args: object, train_config: object, test_file: str, data_set_name: str, tagger: str)#

Evaluate only the taggers in the files or also the UMAMI tagger.

Parameters:
  • args (object) – Loaded argparser.

  • train_config (object) – Loaded train config.

  • test_file (str) – Path to the files which are to be tested. Wildcards are supported.

  • data_set_name (str) – Dataset name for the results files. The results will be saved in dicts. The key will be this dataset name.

  • tagger (str) – Name of the tagger that is to be evaluated. Can either be umami or umami_cond_att depending which architecture is used.

Raises:
  • ValueError – If no epoch is given when evaluating UMAMI.

  • ValueError – If the given tagger argument in train config is not a list.

  • ValueError – If Shapley is called but the tagger is not DL1

umami.evaluate_model.get_parser()#

Argument parser for the evaluation script.

Returns:

args

Return type:

parse_args

umami.plot_input_variables module#

This script plots the given input variables of the given files and also a comparison.

umami.plot_input_variables.get_parser()#

Argument parser for Preprocessing script.

Returns:

args

Return type:

parse_args

umami.plot_input_variables.plot_jets_variables(plot_config, plot_type)#

Plot jet variables.

Parameters:
  • plot_config (object) – plot configuration

  • plot_type (str) – Plottype, like pdf or png

umami.plot_input_variables.plot_trks_variables(plot_config, plot_type)#

Plot track variables.

Parameters:
  • plot_config (object) – plot configuration

  • plot_type (str) – Plottype, like pdf or png

umami.plotting_epoch_performance module#

Execution script for epoch performance plotting.

umami.plotting_epoch_performance.get_parser()#

Argument parser for Preprocessing script.

Returns:

args

Return type:

parse_args

umami.plotting_epoch_performance.main(args, train_config)#

Executes plotting of epoch performance plots

Parameters:
  • args (parser.parse_args) – command line argument parser options

  • train_config (object) – configuration file used for training

Raises:

ValueError – If the given tagger is not supported.

umami.plotting_umami module#

This script allows to plot the ROC curves (and ratios to other models), the confusion matrix and the output scores (pb, pc, pu). A configuration file has to be provided. See umami/examples/plotting_umami_config*.yaml for examples. This script works on the output of the evaluate_model.py script and has to be specified in the config file as ‘evaluation_file’.

umami.plotting_umami.get_parser()#

Argument parser for Preprocessing script.

Returns:

args

Return type:

parse_args

umami.plotting_umami.plot_confusion_matrix(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str) None#

Plot confusion matrix.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

umami.plotting_umami.plot_frac_contour(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str, print_model: bool) None#

Plot the fraction contour plot.

Parameters:
  • plot_name (str) – Full path + name of the plot

  • plot_config (dict) – Loaded plotting config as dict.

  • eval_params (dict) – Evaluation parameters from the plotting config.

  • eval_file_dir (str) – File which is to use for plotting.

  • print_model (bool) – Print the logger while plotting.

umami.plotting_umami.plot_probability(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str, print_model: bool) None#

Plots probability comparison.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

  • print_model (bool) – Print the models which are plotted while plotting.

umami.plotting_umami.plot_roc(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str, print_model: bool) None#

Plot ROCs.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

  • print_model (bool) – Print the models which are plotted while plotting.

Raises:

AttributeError – If the needed n_jets per class used to calculate the rejections is not in the rej_per_epoch results file.

umami.plotting_umami.plot_saliency(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str) None#

Plot saliency maps.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

umami.plotting_umami.plot_score(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str, print_model: bool) None#

Plot score comparison.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

  • print_model (bool) – Print the models which are plotted while plotting.

umami.plotting_umami.plot_var_vs_eff(plot_name: str, plot_config: dict, eval_params: dict, eval_file_dir: str, print_model: bool) None#

Plot pT vs efficiency.

Parameters:
  • plot_name (str) – Full path of the plot.

  • plot_config (dict) – Dict with the plot configs.

  • eval_params (dict) – Dict with the evaluation parameters.

  • eval_file_dir (str) – Path to the results directory of the model.

  • print_model (bool) – Print the models which are plotted while plotting.

umami.plotting_umami.set_up_plots(plot_config_dict: dict, plot_dir: str, eval_file_path: str, file_format: str, print_model: bool) None#

Setting up plot settings.

Parameters:
  • plot_config_dict (dict) – Dict with the plot settings.

  • plot_dir (str) – Path to the output directory of the plots.

  • eval_file_path (str) – Path to the directory where the result files are saved.

  • file_format (str) – String of the file format.

  • print_model (bool) – Print the logger while plotting.

Raises:

NameError – If given plottype is not supported.

umami.preprocessing module#

Execution script to run preprocessing steps.

umami.preprocessing.get_parser()#

Argument parser for Preprocessing script.

Returns:

args

Return type:

parse_args

umami.sample_merging module#

Execution script to run merging of ttbar samples.

umami.sample_merging.get_parser()#

Argument parser for Preprocessing script.

Returns:

args

Return type:

parse_args

umami.train module#

Training script to perform various tagger trainings.

umami.train.check_train_file_format(input_file: str)#

_summary_

Parameters:

input_file (str) – Path to input h5 file to check

Raises:

KeyError – If the specified key is not present in the input file

umami.train.get_parser()#

Argument parser for the train executable.

Returns:

args

Return type:

parse_args

Module contents#

Umami framework used in ATLAS FTAG for dataset preparation and tagger training.