roc_scores#
- scio.eval.roc_scores(confs_ind, confs_ood, *, scores_and_layers=None, ood_title=None, legend=True, convex_hull=False, ax=None)[source]#
For a given OoD set, plot ROCs over all scores.
- Parameters:
confs_ind (
NDArray) – Confidence scores on In-Distribution data. Shape(n_scores, n_ind_samples).confs_ood (
NDArray) – Confidence scores on Out-of-Distribution data. Shape(n_scores, n_ood_samples).scores_and_layers (
Iterable[ScoreClassifAndLayers | str], optional) – Seefit_scores()forScoreClassifAndLayerselements. Scores (and layers) used to computeconfs_*incompute_confidence(). Used only for legend purposes.ood_title (
str, optional) – Title of the OoD set related toconfs_ood. Used only for the plot title.legend (
bool) – Whether or not to show legend. Defaults toTrue.convex_hull (
bool) – Whether to show the convex hull for each Pareto front. Defaults toFalse.ax (
plt.Axes, optional) – If provided, ROCs are plotted on thisax.
- Returns:
ax (
plt.Axes) – The matplotlib axes containing the plot.