scoringrules.logs_2pnormal#
- scoringrules.logs_2pnormal(obs: ArrayLike, scale1: ArrayLike, scale2: ArrayLike, location: ArrayLike, *, backend: Backend = None) ArrayLike#
Compute the logarithmic score (LS) for the two-piece normal distribution.
This score is equivalent to the negative log likelihood of the two-piece normal distribution.
- Parameters:
- obsarray_like
The observed values.
- scale1array_like
Scale parameter of the lower half of the forecast two-piece normal distribution.
- scale2array_like
Scale parameter of the upper half of the forecast two-piece normal distribution.
- locationarray_like
Location parameter of the forecast two-piece normal distribution.
- backendstr
The name of the backend used for computations. Defaults to ‘numba’ if available, else ‘numpy’.
- Returns:
- scorearray_like
The LS between 2pNormal(scale1, scale2, location) and obs.
Examples
>>> import scoringrules as sr >>> sr.logs_2pnormal(0.0, 0.4, 2.0, 0.1)