transf_to_unbounded_params#
- luas.jax_convenience_fns.transf_to_unbounded_params(p, param_bounds)[source]#
Replicates the transformation used by
PyMCandNumPyroto convert a PyTree of parameters - some or all of which lie within the bounds given byparam_bounds- to unbounded parameters using the transformation given intransf_to_unbounded.Used for calculating the Laplace approximation of the posterior with respect to the transformed parameters used by
PyMCandNumPyrofor sampling.Examples
For a single parameter
p["d"]which lies between bounds(a, b),param_boundsshould be of the form:param_bounds = {"d":[a, b]}whereaandbhave the same shape asp["d"].- Parameters:
p (PyTree) – All parameters used for log likelihood calculations potentially including additional unbounded parameters.
param_bounds (PyTree) – Contains any bounds for the parameters in
p.
- Returns:
All parameters in
pwith the unbounded transformed values for any parameter inparam_bounds. Should match the transformed parameters being sampled byPyMCandNumPyro.- Return type:
JAXArray