sbi.analysis.sbc_rank_plot#
- sbc_rank_plot(ranks, num_posterior_samples, num_bins=None, plot_type='cdf', parameter_labels=None, ranks_labels=None, colors=None, fig=None, ax=None, figsize=None, **kwargs)[source]#
Plot simulation-based calibration ranks as empirical CDFs or histograms.
Additional options can be passed via the kwargs argument, see _sbc_rank_plot.
- Parameters:
ranks (Tensor | ndarray | List[Tensor] | List[ndarray]) – Tensor of ranks to be plotted shape (num_sbc_runs, num_parameters), or list of Tensors when comparing several sets of ranks, e.g., set of ranks obtained from different methods.
num_bins (int | None) – number of bins used for binning the ranks, default is num_sbc_runs / 20.
plot_type (str) – type of SBC plot, histograms (“hist”) or empirical cdfs (“cdf”).
parameter_labels (List[str] | None) – list of labels for each parameter dimension.
ranks_labels (List[str] | None) – list of labels for each set of ranks.
colors (List[str] | None) – list of colors for each parameter dimension, or each set of ranks.
num_posterior_samples (int)
fig (Figure | None)
ax (Axes | None)
figsize (tuple | None)
- Returns:
figure and axis objects.
- Return type:
fig, ax