plot_credal_set

probly.plot.credal.plot.plot_credal_set(data: NumpyCategoricalCredalSet | TorchCategoricalCredalSet, *, title: str | None = None, labels: list[str] | None = None, series_labels: list[str] | None = None, config: PlotConfig | None = None, show: bool = False, gridlines: bool = True, ground_truth: SingletonCredalSet | None = None) → Axes[source]

Plot a Categorical credal set.

For 2-class credal sets, renders a horizontal interval plot where the x-axis represents P(class 2). For 3-class credal sets, renders a ternary simplex diagram. For 4+ classes, renders a spider (radar) plot.

Dispatches to a type-specific renderer based on the concrete credal set type. For batched inputs, each element in the batch is overlaid on the same axes with a distinct color.

The following types are supported:

Parameters:
  • data – The credal set to plot.

  • title – Title of the plot.

  • labels – Class labels. Defaults to ["C0", "C1", ...].

  • series_labels – Optional legend labels, one per batch element. When provided a legend is shown. Defaults to None (no legend).

  • config – Plot configuration. Defaults to PlotConfig().

  • show – Whether to call plt.show() after plotting.

  • gridlines – Whether to display gridlines. Used for 3-class (ternary) and 4+-class (spider) plots. Defaults to True.

  • ground_truth – Optional ground-truth distribution to overlay as a star marker. Must be an SingletonCredalSet with the same number of classes as data.

Returns:

The matplotlib axes with the plot.

Raises:

Examples using probly.plot.credal.plot.plot_credal_set

Conformalized Credal Set Prediction — PyTorch.

Conformalized Credal Set Prediction — PyTorch.

Credal BNN Visualization

Credal BNN Visualization

Credal DRO Output Visualization

Credal DRO Output Visualization

Credal Ensembling Visualization

Credal Ensembling Visualization

Credal Net Visualization

Credal Net Visualization

Credal Relative Likelihood Visualization

Credal Relative Likelihood Visualization

Credal Wrapper Output Visualization

Credal Wrapper Output Visualization

Efficient Credal Prediction Visualization

Efficient Credal Prediction Visualization

Plotting binary credal sets on an interval

Plotting binary credal sets on an interval

Plotting credal sets on the simplex

Plotting credal sets on the simplex

Plotting credal sets on a spider (radar) chart

Plotting credal sets on a spider (radar) chart

Convex credal set

Convex credal set

Discrete credal set

Discrete credal set

Distance-based credal set

Distance-based credal set

Probability-intervals credal set

Probability-intervals credal set

Singleton credal set

Singleton credal set