LogNormal
DistributionLogNormal(loc: Tensor | float, scale: Tensor | float, validate_args: bool | None = None)Log-Normal distribution: where .
If a random variable has a Log-Normal distribution then its natural logarithm is Normally distributed. The probability density function is
Parameters
Attributes
Notes
The Log-Normal arises naturally whenever a quantity is the product of many independent positive factors (multiplicative growth), just as the Normal arises from additive contributions. Applications include particle-size distributions, financial asset prices, and reaction times.
Mean and variance of :
Note that both grow super-exponentially in .
Mode:
The mode is always less than the mean, reflecting right-skewness.
Examples
>>> import lucid.distributions as dist
>>> d = dist.LogNormal(loc=0.0, scale=1.0)
>>> x = d.rsample((100,))
>>> (x > 0).all() # support is strictly positive
Tensor(True)Used by 2
Constructors
1__init__
→None__init__(loc: Tensor | float, scale: Tensor | float, validate_args: bool | None = None)Properties
3Mode of the Log-Normal distribution.
The mode is strictly less than the mean, reflecting the right-skewed nature of the distribution.
Returns
TensorShape batch_shape.
Instance methods
3Shannon differential entropy of the Log-Normal distribution.
where the extra term accounts for the Jacobian of the exponential transformation.
Returns
TensorEntropy values of shape batch_shape (in nats).
Draw reparameterised samples.
Samples are obtained by exponentiating Normal samples from the
underlying Normal base distribution:
Parameters
sample_shapetuple[int, ...]= ()Returns
TensorStrictly positive samples of shape
sample_shape + batch_shape.