probly.evaluation.ood.visualize_ood¶
- probly.evaluation.ood.visualize_ood(in_distribution: np.ndarray | list[float], out_distribution: np.ndarray | list[float], plot_types: list[str] | None = None, invert_scores: bool = True, config: PlotConfig | None = None) dict[str, Figure][source]¶
Generate visualization plots from OOD scores.
- Parameters:
in_distribution – Scores for in-distribution samples.
out_distribution – Scores for out-of-distribution samples.
plot_types – List of specific plots to return (e.g. [‘roc’, ‘hist’, ‘pr’]). If None, all plots are generated.
invert_scores – If True (default), assumes scores are ‘Confidence’ (High = ID). They will be inverted (1.0 - score) for metrics where OOD is the positive class. If False, assumes scores are ‘Anomaly Scores’ (High = OOD).
config – Plot configuration shared across all generated figures. Defaults to
PlotConfig()whenNone.
- Returns:
A dict containing matplotlib Figures for the requested plots.