sbi.analysis.pp_plot

Navigation

sbi.analysis.pp_plot#

pp_plot(scores, scores_null, true_scores_null, conf_alpha, n_alphas=100, labels=None, colors=None, ax=None, **kwargs)[source]#

Probability - Probability (P-P) plot for hypothesis tests to assess the validity of one (or several) estimator(s).

See here for more details.

Parameters:
  • scores (List[ndarray] | Dict[Any, ndarray]) – test scores estimated on observed data and evaluated on the test set, of shape (n_eval,). One array per estimator.

  • scores_null (List[ndarray] | Dict[Any, ndarray]) – test scores estimated under the null hypothesis and evaluated on the test set, of shape (n_eval,). One array per null trial.

  • true_scores_null (ndarray) – theoretical true scores under the null hypothesis, of shape (n_eval,).

  • labels (List[str] | None) – labels for the estimators, defaults to None.

  • colors (List[str] | None) – colors for the estimators, defaults to None.

  • conf_alpha (float) – significanecee level of the hypothesis test.

  • n_alphas (int) – number of cdf-values to compute the P-P plot, defaults to 100.

  • ax (Axes | None) – axis to plot on, defaults to None.

  • kwargs (Any) – additional arguments for matplotlib plotting.

Returns:

axes with the P-P plot.

Return type:

ax