summary_plot#

scio.eval.summary_plot(confs_ind, confs_oods, *, scores_and_layers=None, keep=None, oods_title=None, legend=True, convex_hull=False, show=True, block=None, **hist_kw)[source]#

Plot and show histograms for each score, ROCs for each OoD set.

Parameters:
  • confs_ind (NDArray) – First output of compute_confidence().

  • confs_oods (tuple[NDArray, ...]) – Second output of compute_confidence().

  • scores_and_layers (tuple[ScoreClassifAndLayers | str, ...], optional) – See roc_scores().

  • keep (ArrayLike, optional) – If provided, the plots are restricted to the corresponding scores. In this case, it must be a \(1\)D array of integer indexes, or a boolean mask. Using integer indexes allows arbitrary reordering of the scores.

  • oods_title (tuple[str, ...], optional) – See histogram_oods().

  • legend (tuple[bool, bool] | bool) – Whether to show legends for histograms and ROCs respectively. If a unique bool is provided, it is used for both. Defaults to True.

  • convex_hull (bool) – See roc_scores().

  • show (bool) – Whether to end with a plt.show() call. Defaults to True.

  • block (bool, optional) – If show, passed to plt.show().

  • **hist_kw – Passed to sns.histplot(), except the ax kwarg. Unless overidden, the following values are also passed: bins=30, stat="density" and common_norm=False.

Note

In its current state, summary_plot() may render cropped or incomplete legends when working with a lot of scores or OoD sets. In this case, you may wish to hide one or both legends with the legend option.