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
Notes
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,))
>>> bool(samples.min() >= 1.0) # always >= scale
TrueUsed by 2
Constructors
1__init__
→None__init__(scale: Tensor | float, alpha: Tensor | float, validate_args: bool | None = None)Initialise a Pareto distribution.
Parameters
Properties
4Mean of the Pareto distribution: .
Defined only for ; returns inf or nan
for .
Returns
TensorMean values of shape batch_shape.
Mode of the Pareto distribution: the scale , where the density is largest.
Support of the Pareto distribution: .
Returns
Constraintgreater_than_eq(scale) — the bound is the scale tensor,
so each batch member is held to its own .
Variance of the Pareto distribution.
Defined only for .
Returns
TensorVariance values of shape batch_shape.
Instance methods
5Cumulative distribution function of the Pareto distribution.
The Exponential(alpha) CDF at ; 0 below
.
Returns probabilities in .
Examples
>>> Pareto(scale=1.0, alpha=2.0).cdf(lucid.tensor(2.0)) # 1 - 1/4
tensor(0.75)Quantile function of the Pareto distribution.
Returns quantiles in .
Examples
>>> Pareto(scale=1.0, alpha=2.0).icdf(lucid.tensor(0.75))
tensor(2.)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).