scoringrules.logs_binomial#
- scoringrules.logs_binomial(obs: ArrayLike, n: ArrayLike, prob: ArrayLike, *, backend: Backend = None) ArrayLike#
Compute the logarithmic score (LS) for the binomial distribution.
This score is equivalent to the negative log likelihood of the binomial distribution
- Parameters:
- obsarray_like
The observed values.
- narray_like
Size parameter of the forecast binomial distribution as an integer or array of integers.
- probarray_like
Probability parameter of the forecast binomial distribution as a float or array of floats.
- backendstr
The name of the backend used for computations. Defaults to ‘numba’ if available, else ‘numpy’.
- Returns:
- scorearray_like
The LS between Binomial(n, prob) and obs.
Examples
>>> import scoringrules as sr >>> sr.logs_binomial(4, 10, 0.5)