tapas.report.utils.metric_comparison_plots

tapas.report.utils.metric_comparison_plots(data, comparison_label, fixed_pair_label, metrics, marker_label, output_path)
For a fixed pair of datasets-attacks-generators-target available in the data make a figure comparing

performance between metrics. Options configure which dimension to compare against. Figures are saved to disk.

Parameters
  • data (dataframe) – Input dataframe from the MIAttackReport class

  • comparison_label (str) – Name of column that will be used as X axis.

  • fixed_pair_columns (list[str]) – Columns in dataframe to fix (groupby) for a given figure in order to make meaningful comparisons. It can be any pair of columns from the report.

  • metrics (list[str]) – List of metrics to be used in the report, these can be any of the following: “accuracy”, “true_positive_rate”, “false_positive_rate”, “mia_advantage”, “privacy_gain”, “auc”.

  • marker_label (str) – Column in dataframe that be used to as marker in a point plot comparison. It can be either: ‘generator’, ‘attack’ or ‘target_id’.

  • output_path (str) – Path where the figure is to be saved.

Return type

None