Scaled#
- class pymc_extras.prior.Scaled(dist: Prior, factor: XTensorLike)[source]#
Scaled distribution for numerical stability.
This is the same as multiplying the variable by a constant factor.
- Parameters:
dist (Prior) – The prior distribution to scale.
factor (pt.TensorLike) – The scaling factor. This will have to be broadcastable to the dimensions of the distribution.
Examples
Create a scaled normal distribution.
from pymc_extras.prior import Prior, Scaled normal = Prior("Normal", mu=0, sigma=1) # Same as Normal(mu=0, sigma=10) scaled_normal = Scaled(normal, factor=10)
Methods
__init__(dist, factor)create_variable(name[, xdist])Create a scaled variable.
Attributes
dimsThe dimensions of the scaled distribution.