jesterTOV.inference.base.transform.BijectiveTransform#

class BijectiveTransform(name_mapping)[source]#

Bases: NtoNTransform

Bijective (invertible) N-to-N parameter transform with Jacobian corrections.

Note: This class follows the Jim/jimgw architecture. Used for sample transforms where parameters are transformed during MCMC sampling and Jacobian corrections are applied to the prior.

__init__(name_mapping)#
Parameters:

name_mapping (tuple[list[str], list[str]]) – Tuple of (input_names, output_names) for the transform.

Methods

__init__(name_mapping)

backward(y)

Pull back the input y to original coordinate x (without Jacobian).

forward(x)

Push forward the input x to transformed coordinate y.

inverse(y)

Inverse transform the input y to original coordinate x.

propagate_name(x)

Propagate parameter names through the transform.

transform(x)

Transform the input x to transformed coordinate y and return the log Jacobian determinant.

Attributes

n_dim

inverse_transform_func

transform_func

name_mapping

backward(y)[source]#

Pull back the input y to original coordinate x (without Jacobian).

Parameters:

y (ParamDict) – The transformed dictionary.

Return type:

dict[str, Float]

Returns:

x (ParamDict) – The original dictionary.

inverse(y)[source]#

Inverse transform the input y to original coordinate x.

Parameters:

y (ParamDict) – The transformed dictionary.

Return type:

tuple[dict[str, Float], Float]

Returns:

  • x (ParamDict) – The original dictionary.

  • log_det (Float) – The log Jacobian determinant.

inverse_transform_func: Callable[[dict[str, Float]], dict[str, Float]]#