compute_confidence#

scio.eval.compute_confidence(scores_fit, *, ind, oods, oods_title=None, show_progress=True)[source]#

Compute the prediction confidence scores for given InD and OoDs.

Parameters:
  • scores_fit (Collection[BaseScoreClassif]) – Fit scores.

  • ind (Tensor) – In-Distribution data.

  • oods (tuple[Tensor, ...]) – Out-of-Distribution data. Each element is a Tensor representing one OoD dataset.

  • oods_title (Collection[str], optional) – Title of OoD sets. Used only for progress bar details.

  • show_progress (bool) – Whether to show progress bar. Defaults to True.

Returns:

  • confs_ind (NDArray) – The scores associated with the net’s predicted class for In-Distribution data. Shape (n_scores, n_ind_samples).

  • confs_oods (tuple[NDArray, ...]) – Analogue for Out-of-Distribution data (one element per element in oods).