TransformedVar

Contents

TransformedVar#

class liesel_ptm.TransformedVar(value, prior=None, name='', bijector=<tfp.bijectors.Softplus 'softplus' batch_shape=[] forward_min_event_ndims=0 inverse_min_event_ndims=0 dtype_x=? dtype_y=?>)[source]#

Bases: Var

Class for defining a possibly transformed variable.

Parameters:
  • value (float) – The value of the variable.

  • prior (Optional[Dist]) – The probability distribution of the variable. (default: None)

  • name (str) – Name of the variable. (default: '')

  • bijector (Bijector | None) – A tensorflow bijector instance. If a bijector is supplied, the variable \(\nu\) will be transformed using the bijector. This renders the variable itself weak, meaning that it is a deterministic function of the newly created transformed variable. The prior is transferred to this transformed variable and transformed according to the change-of-variables theorem. (default: <tfp.bijectors.Softplus 'softplus' batch_shape=[] forward_min_event_ndims=0 inverse_min_event_ndims=0 dtype_x=? dtype_y=?>)

Methods

predict

Returns posterior samples of this variable.

Attributes

transformed

The transformed variable (if any).