Pareto
DistributionPareto(scale: Tensor | float, alpha: Tensor | float, validate_args: bool | None = None)Pareto distribution — a heavy-tailed power-law family on .
Pareto(scale=x_m, alpha=α) models quantities that follow a power-law
tail. The 80/20 rule (Pareto principle) is a heuristic consequence of
this distribution with .
Parameters
scaleTensor | floatalphaTensor | floatvalidate_argsbool | None= NoneTrue, validate parameter constraints at construction time.Attributes
scaleTensoralphaTensorNotes
PDF:
Log-PDF:
Moments (when defined):
- Mean ():
- Variance ():
Entropy:
Reparameterised sampling uses the inverse-CDF trick: if then .
Examples
>>> import lucid
>>> from lucid.distributions import Pareto
>>> dist = Pareto(scale=1.0, alpha=2.0)
>>> samples = dist.rsample((200,))
>>> samples.min() # always >= scaleMethods (7)
__init__
→None__init__(scale: Tensor | float, alpha: Tensor | float, validate_args: bool | None = None)Initialise a Pareto distribution.
Parameters
scaleTensor | floatalphaTensor | floatvalidate_argsbool | None= NoneTrue, validate parameter constraints at construction time.support
→Constraintsupport: ConstraintSupport of the Pareto distribution: positive reals .
The true support is per element, but since the
lower bound varies across the batch a bare positive constraint is
returned.
Returns
ConstraintThe positive constraint.
mean
→Tensormean: TensorMean of the Pareto distribution: .
Defined only for ; returns inf or nan
for .
Returns
TensorMean values of shape batch_shape.
variance
→Tensorvariance: TensorVariance of the Pareto distribution.
Defined only for .
Returns
TensorVariance values of shape batch_shape.
rsample
→Tensorrsample(sample_shape: tuple[int, ...] = ())Draw reparameterised samples via the inverse-CDF trick.
Uses where
. Gradients propagate
through both scale and alpha.
Parameters
sample_shapetuple[int, ...]= ()Returns
TensorSamples of shape (*sample_shape, *batch_shape).
log_prob
→Tensorlog_prob(value: Tensor)Log-probability density of the Pareto distribution.
Parameters
valueTensorReturns
TensorLog-density values of the same shape as value.
entropy
→Tensorentropy()Entropy of the Pareto distribution.
Returns
TensorEntropy values of shape batch_shape (nats).