scoringrules.logs_gpd

Contents

scoringrules.logs_gpd#

scoringrules.logs_gpd(obs: ArrayLike, shape: ArrayLike, location: ArrayLike = 0.0, scale: ArrayLike = 1.0, *, backend: Backend = None) ArrayLike#

Compute the logarithmic score (LS) for the generalised Pareto distribution (GPD).

This score is equivalent to the negative log likelihood of the GPD

Parameters:
obsarray_like

The observed values.

shapearray_like

Shape parameter of the forecast GPD distribution.

locationarray_like

Location parameter of the forecast GPD distribution.

scalearray_like

Scale parameter of the forecast GPD distribution.

backendstr

The name of the backend used for computations. Defaults to ‘numba’ if available, else ‘numpy’.

Returns:
scorearray_like

The LS between obs and GPD(shape, location, scale).

Examples

>>> import scoringrules as sr
>>> sr.logs_gpd(0.3, 0.9)