GPyTorchInverseGammaPrior
|
Creates an inverse gamma distribution parameterized by concentration and rate where: |
Methods
|
Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape. |
Attributes
|
- class gumbi.utils.GPyTorchInverseGammaPrior(concentration, rate, validate_args=False, transform=None)
Bases:
Prior
,InverseGamma
Creates an inverse gamma distribution parameterized by concentration and rate where:
X ~ Gamma(concentration, rate) Y = 1 / X ~ InverseGamma(concentration, rate)
concentration (float or Tensor): shape parameter of the distribution (often referred to as alpha) rate (float or Tensor): rate = 1 / scale of the distribution (often referred to as beta)
- expand(batch_shape)
Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape. This method calls
expand
on the distribution’s parameters. As such, this does not allocate new memory for the expanded distribution instance. Additionally, this does not repeat any args checking or parameter broadcasting in __init__.py, when an instance is first created.- Parameters:
batch_shape (torch.Size) – the desired expanded size.
_instance – new instance provided by subclasses that need to override .expand.
- Returns:
New distribution instance with batch dimensions expanded to batch_size.