nifty8.re.prior module#

class InvGammaPrior(a, scale, loc=0.0, step=0.01, **kwargs)[source]#

Bases: WrappedCall

__init__(a, scale, loc=0.0, step=0.01, **kwargs)[source]#

Transforms standard normally distributed random variables to an inverse gamma distribution.

Parameters:
  • a (float) – Shape parameter.

  • scale (float) – Scale parameter.

  • loc (float) – Location parameter.

  • step (float) – Step size for numerical integration.

  • name (hashable, optional) – Name within the new input on which call acts.

  • shape (tuple or tree-like structure of ShapeWithDtype) – Shape of the latent parameter(s) that are transformed to the desired distribution. This can also be an arbitrary shape-dtype structure in which case dtype is ignored. Defaults to a scalar.

  • dtype (dtype) – Data type of the latent parameter(s) that are transformed to the desired distribution.

Notes

Broadcasting over tree-like structure is not yet implemented. Please file an issue if you need this feature.

class LaplacePrior(alpha, **kwargs)[source]#

Bases: WrappedCall

__init__(alpha, **kwargs)[source]#

Transforms standard normally distributed random variables to a Laplace distribution.

Parameters:
  • alpha (tree-like structure with arithmetics) – Scale parameter.

  • name (hashable, optional) – Name within the new input on which call acts.

  • shape (tuple or tree-like structure of ShapeWithDtype) – Shape of the latent parameter(s) that are transformed to the desired distribution. This can also be an arbitrary shape-dtype structure in which case dtype is ignored. Defaults to a scalar.

  • dtype (dtype) – Data type of the latent parameter(s) that are transformed to the desired distribution.

class LogNormalPrior(mean, std, **kwargs)[source]#

Bases: WrappedCall

__init__(mean, std, **kwargs)[source]#

Transforms standard normally distributed random variables to a log-normal distribution.

Parameters:
  • mean (tree-like structure with arithmetics) – Mean of the log-normal distribution.

  • std (tree-like structure with arithmetics) – Standard deviation of the log-normal distribution.

  • name (hashable, optional) – Name within the new input on which call acts.

  • shape (tuple or tree-like structure of ShapeWithDtype) – Shape of the latent parameter(s) that are transformed to the desired distribution. This can also be an arbitrary shape-dtype structure in which case dtype is ignored. Defaults to a scalar.

  • dtype (dtype) – Data type of the latent parameter(s) that are transformed to the desired distribution.

class NormalPrior(mean, std, **kwargs)[source]#

Bases: WrappedCall

__init__(mean, std, **kwargs)[source]#

Transforms standard normally distributed random variables to a normal distribution.

Parameters:
  • mean (tree-like structure with arithmetics) – Mean of the normal distribution.

  • std (tree-like structure with arithmetics) – Standard deviation of the normal distribution.

  • name (hashable, optional) – Name within the new input on which call acts.

  • shape (tuple or tree-like structure of ShapeWithDtype) – Shape of the latent parameter(s) that are transformed to the desired distribution. This can also be an arbitrary shape-dtype structure in which case dtype is ignored. Defaults to a scalar.

  • dtype (dtype) – Data type of the latent parameter(s) that are transformed to the desired distribution.

class UniformPrior(a_min, a_max, **kwargs)[source]#

Bases: WrappedCall

__init__(a_min, a_max, **kwargs)[source]#

Transforms standard normally distributed random variables to a uniform distribution.

Parameters:
  • a_min (tree-like structure with arithmetics) – Minimum value.

  • a_max (tree-like structure with arithmetics) – Maximum value.

  • name (hashable, optional) – Name within the new input on which call acts.

  • shape (tuple or tree-like structure of ShapeWithDtype) – Shape of the latent parameter(s) that are transformed to the desired distribution. This can also be an arbitrary shape-dtype structure in which case dtype is ignored. Defaults to a scalar.

  • dtype (dtype) – Data type of the latent parameter(s) that are transformed to the desired distribution.