transf_from_unbounded_params#
- luas.jax_convenience_fns.transf_from_unbounded_params(p_unbounded, param_bounds)[source]#
Inverse of the transformation in transf_to_unbounded_params. Converts parameters being sampled by
PyMC
andNumPyro
to the parameters which lie between bounds described inparam_bounds
which are used for log likelihood calculations.Used for calculating the Laplace approximation of the posterior with respect to the transformed parameters used by
PyMC
andNumPyro
for sampling.Examples
For a single parameter
p["d"]
which should lie between bounds(a, b)
,param_bounds
should be of the form:param_bounds = {"d":[a, b]}
wherea
andb
have the same shape asp["d"]
.- Parameters:
p_unbounded (PyTree) – All parameters used for sampling by
PyMC
andNumPyro
to convert for log likelihood calculations which lie in an transformed unbounded space.param_bounds (PyTree) – Contains any bounds for the parameters in
p
.
- Returns:
All parameters used for log likelihood calculations potentially including additional unbounded parameters.
- Return type:
JAXArray