sbi.inference.posterior_estimator_based_potential#
- posterior_estimator_based_potential(posterior_estimator, prior, x_o, enable_transform=True)[source]#
Returns the potential for posterior-based methods.
It also returns a transformation that can be used to transform the potential into unconstrained space.
The potential is the same as the log-probability of the posterior_estimator, but it is set to \(-\inf\) outside of the prior bounds.
- Parameters:
posterior_estimator (ConditionalDensityEstimator) – The neural network modelling the posterior.
prior (Distribution) – The prior distribution.
x_o (Tensor | None) – The observed data at which to evaluate the posterior.
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: