probly.visualization.credal.plot_multid

Plotting for >3 classes.

Functions

radar_factory(num_vars[, frame])

Create a radar chart with num_vars axes.

Classes

MultiVisualizer()

Class to create multidimensional plots.

class probly.visualization.credal.plot_multid.MultiVisualizer[source]

Bases: object

Class to create multidimensional plots.

spider_plot(probs, labels, title, mle_flag, credal_flag, ax=None)[source]

General radar (spider) plot for credal predictions.

Parameters:
  • probs (np.ndarray) – NumPy array of shape (N, C) with class probabilities per sample, where N is the number of samples and C is the number of classes.

  • labels (list[str]) – Labels for the classes. Must have length C.

  • title (str) – Title of the plot.

  • mle_flag (bool) – If True, a point for the mean probability vector (MLE-style summary) is shown.

  • credal_flag (bool) – If True, the credal band (min-max envelope across samples) is shown.

  • ax (Axes | None) – Optional Matplotlib Axes to draw into. If provided, it should be a radar projection Axes. If None, a new figure and radar Axes are created.

Returns:

The Matplotlib Axes containing the spider plot.

Return type:

Axes

probly.visualization.credal.plot_multid.radar_factory(num_vars, frame='circle')[source]

Create a radar chart with num_vars axes.

Parameters:
  • num_vars (int) – Number of variables (axes) in the radar chart.

  • frame (str) – Shape of the frame, either "circle" or "polygon".

Returns:

Array of angles (theta) corresponding to each variable axis.

Return type:

ndarray