Parameter Transformations

class pypomp.ParTrans(to_est: Callable[[Annotated[dict[str, float | Array], 'ParamDict']], Annotated[dict[str, float | Array], 'ParamDict']] | None = None, from_est: Callable[[Annotated[dict[str, float | Array], 'ParamDict']], Annotated[dict[str, float | Array], 'ParamDict']] | None = None)[source]

Bases: object

Parameter transformations between natural and estimation scales.

Enables numerical algorithms to switch between operating in an unconstrained estimation parameter space (e.g. log-transformed positive parameters, logit-transformed probabilities) and running the model in the natural parameter space.

Parameters:
  • to_est (callable or None, optional) – A function mapping a parameter dictionary to the estimation scale. If None, defaults to the identity transformation.

  • from_est (callable or None, optional) – A function mapping a parameter dictionary from the estimation scale back to the natural scale. If None, defaults to the identity transformation.

Attributes

ParTrans.to_est: Callable[[Annotated[dict[str, float | Array], 'ParamDict']], Annotated[dict[str, float | Array], 'ParamDict']]

The parameter transformation function to the estimation parameter space.

ParTrans.from_est: Callable[[Annotated[dict[str, float | Array], 'ParamDict']], Annotated[dict[str, float | Array], 'ParamDict']]

The parameter transformation function from the estimation parameter space to the natural parameter space.