pymc.AsymmetricLaplace#

class pymc.AsymmetricLaplace(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#

Asymmetric-Laplace distribution.

The pdf of this distribution is

\[{f(x|b,\kappa,\mu) = \left({\frac{b}{\kappa + 1/\kappa}}\right)\,e^{-(x-\mu)b\,s\kappa ^{s}}}\]

where

\[s = sgn(x-\mu)\]

Support

\(x \in \mathbb{R}\)

Mean

\(\mu-\frac{\kappa-1/\kappa}{b}\)

Variance

\(\frac{1+\kappa^{4}}{b^2\kappa^2 }\)

AsymmetricLaplace distribution can be parameterized either in terms of kappa or q. The link between the two parametrizations is given by

\[\kappa = \sqrt{\frac{q}{1-q}}\]
Parameters:
kappatensor_like of float

Symmetry parameter (kappa > 0).

mutensor_like of float

Location parameter.

btensor_like of float

Scale parameter (b > 0).

qtensor_like of float

Symmetry parameter (0 < q < 1).

Notes

The parametrization in terms of q is useful for quantile regression with q being the quantile of interest.

Methods

AsymmetricLaplace.dist([kappa, mu, b, q])

Create a tensor variable corresponding to the cls distribution.