scoringrules.logs_2pexponential

scoringrules.logs_2pexponential#

scoringrules.logs_2pexponential(obs: ArrayLike, scale1: ArrayLike, scale2: ArrayLike, location: ArrayLike, *, backend: Backend = None) ArrayLike#

Compute the logarithmic score (LS) for the two-piece exponential distribution.

This score is equivalent to the negative log likelihood of the two-piece exponential distribution.

Parameters:
obsarray_like

The observed values.

scale1array_like

First scale parameter of the forecast two-piece exponential distribution.

scale2array_like

Second scale parameter of the forecast two-piece exponential distribution.

locationarray_like

Location parameter of the forecast two-piece exponential distribution.

backendstr

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

Returns:
scorearray_like

The LS between 2pExp(sigma1, sigma2, location) and obs.

Examples

>>> import scoringrules as sr
>>> sr.logs_2pexponential(0.8, 3.0, 1.4, 0.0)