seismometer.plot.mpl.evaluation

seismometer.plot.mpl.evaluation(stats, *, ci_data, truth=None, output=None, show_thresholds=True, highlight=None)

Generates a 2x3 plot showing the performance of a model.

This includes the ROC, recall vs predicted condition prevalence, calibration, PPV vs sensitivity, sensitivity/specificity/ppv, and a histogram.

Parameters:
  • stats (pd.DataFrame) – Table of performance metrics, of the form given by calculate_bin_stats.

  • ci_data (dict) – A required dictionary of the confidence interval information for containing plots. Expects keys ‘roc’, ‘pr’, and ‘conf’.

  • truth (Optional[pd.Series], optional) – A series of the true labels, needed for calibration plot, by default None.

  • output (Optional[pd.Series], optional) – A series of the model output, needed for calibration plot, by default None.

  • show_thresholds (Optional[bool], optional) – If True, shows thresholds on the ROC and PPV vs Sensitivity plots, by default None.

  • highlight (Optional[list[float]], optional) – An optional list of thresholds to highlight on the plots, by default None.

Return type:

The matplotlib figure.