gev_return_period#

gpjax.distributions.gev_return_period(level, loc, scale, concentration)[source]#

The GEV return period of a level: \(T = 1 / P(Y > \text{level})\).

The inverse of gev_return_level(). The exceedance probability comes from GeneralisedExtremeValue.sf(), so very large return periods keep their accuracy. Where the exceedance probability is 0, that is, at or above the upper end point when \(\xi < 0\), the return period is inf (not NaN), and its gradient is 0. All arguments broadcast with the NumPy rules.

Example

>>> import jax.numpy as jnp
>>> from gpjax.distributions import gev_return_period
>>> period = gev_return_period(100.0, loc=40.0, scale=12.0,
...                            concentration=0.1)
Parameters:
  • level (float | int | Float[jaxlib._jax.Array, '...'] | Float[ndarray, '...'] | Int[jaxlib._jax.Array, '...'] | Int[ndarray, '...']) – The level, in the units of the data.

  • loc (float | int | Float[jaxlib._jax.Array, '...'] | Float[ndarray, '...'] | Int[jaxlib._jax.Array, '...'] | Int[ndarray, '...']) – The location \(\mu\).

  • scale (float | int | Float[jaxlib._jax.Array, '...'] | Float[ndarray, '...'] | Int[jaxlib._jax.Array, '...'] | Int[ndarray, '...']) – The scale \(\sigma > 0\).

  • concentration (float | int | Float[jaxlib._jax.Array, '...'] | Float[ndarray, '...'] | Int[jaxlib._jax.Array, '...'] | Int[ndarray, '...']) – The shape \(\xi\) (climate convention, see gev_return_level()).

Returns:

The return periods, with the broadcast shape of the arguments.

Return type:

Float[jaxlib._jax.Array, ‘…’] | Float[ndarray, ‘…’]

Expand for references to gpjax.distributions.gev_return_period

gev_return_period