sbi.inference.ratio_estimator_based_potential

sbi.inference.ratio_estimator_based_potential#

ratio_estimator_based_potential(ratio_estimator, prior, x_o, enable_transform=True)[source]#

Returns the potential for ratio-based methods.

It also returns a transformation that can be used to transform the potential into unconstrained space.

Parameters:
  • ratio_estimator (Module) – The neural network modelling likelihood-to-evidence ratio.

  • prior (Distribution) – The prior distribution.

  • x_o (Tensor | None) – The observed data at which to evaluate the likelihood-to-evidence ratio.

  • enable_transform (bool) – Whether to transform parameters to unconstrained space. When False, an identity transform will be returned for theta_transform.

Returns:

The potential function and a transformation that maps to unconstrained space.

Return type:

Tuple[RatioBasedPotential, Transform]