GenExtreme#
- class pymc_extras.distributions.GenExtreme(name: str, *args, rng=None, dims: str | Sequence[str | None] | None = None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#
Univariate Generalized Extreme Value log-likelihood
The cdf of this distribution is
\[G(x \mid \mu, \sigma, \xi) = \exp\left[ -\left(1 + \xi z\right)^{-\frac{1}{\xi}} \right]\]where
\[z = \frac{x - \mu}{\sigma}\]and is defined on the set:
\[\left\{x: 1 + \xi\left(\frac{x-\mu}{\sigma}\right) > 0 \right\}.\]Note that this parametrization is per Coles (2001) [1], and differs from that of Scipy in the sign of the shape parameter, \(\xi\).
Support
\(x \in [\mu - \sigma/\xi, +\infty]\), when \(\xi > 0\)
\(x \in \mathbb{R}\) when \(\xi = 0\)
\(x \in [-\infty, \mu - \sigma/\xi]\), when \(\xi < 0\)
Mean
\(\mu + \sigma(g_1 - 1)/\xi\), when \(\xi \neq 0, \xi < 1\)
\(\mu + \sigma \gamma\), when \(\xi = 0\)
\(\infty\), when \(\xi \geq 1\) where \(\gamma\) is the Euler-Mascheroni constant, and \(g_k = \Gamma (1-k\xi)\)
Variance
\(\sigma^2 (g_2 - g_1^2)/\xi^2\), when \(\xi \neq 0, \xi < 0.5\)
\(\frac{\pi^2}{6} \sigma^2\), when \(\xi = 0\)
\(\infty\), when \(\xi \geq 0.5\)
- Parameters:
mu (float) – Location parameter.
sigma (float) – Scale parameter (sigma > 0).
xi (float) – Shape parameter
scipy (bool) – Whether or not to use the Scipy interpretation of the shape parameter (defaults to False).
References
- __init__()#
Methods
__init__()dist([mu, sigma, xi, scipy])Create a tensor variable corresponding to the cls distribution.
logcdf(mu, sigma, xi)Compute the log of the cumulative distribution function for Generalized Extreme Value distribution at the specified value.
logp(mu, sigma, xi)Calculate log-probability of Generalized Extreme Value distribution at specified value.
support_point(size, mu, sigma, xi)Using the mode, as the mean can be infinite when \(\xi > 1\)
Attributes
rv_op