incerto.conformal.plot_set_size_hist

incerto.conformal.plot_set_size_hist#

incerto.conformal.plot_set_size_hist(sets, show=True, ax=None)[source]#

Plot a histogram of prediction-set sizes.

Parameters:
  • sets (Sequence[Tensor]) – Sequence of prediction sets (one tensor of class indices per example).

  • show (bool) – If True, call plt.show().

  • ax (Optional[Axes]) – Optional matplotlib Axes to draw into.

Return type:

tuple[Figure, Axes]

Returns:

(fig, ax) tuple.