Skip to content

Implement Weighted Interval Score (WIS) #3

@jc-macdonald

Description

@jc-macdonald

Summary

The WIS scores quantile/interval forecasts and is widely used in epidemiological forecasting (e.g., COVID-19 Forecast Hub).

Functions

Function Description
wis(obs, lower, upper, α) Single-interval WIS at level α
wis(obs, quantile_levels, quantile_values) Multi-quantile WIS

Algorithm

For a central $(1-\alpha)\times100%$ prediction interval $[l, u]$:

$$ \text{IS}_\alpha(l, u, y) = (u - l) + \frac{2}{\alpha}(l - y)\mathbb{1}{y < l} + \frac{2}{\alpha}(y - u)\mathbb{1}{y > u} $$

WIS averages over K intervals plus the median.

References

  • Bracher, J., Ray, E. L., Gneiting, T., & Reich, N. G. (2021). Evaluating epidemic forecasts in an interval format. PLoS Computational Biology.

Acceptance Criteria

  • Single-interval and multi-quantile variants
  • Perfect forecast scores 0
  • Known-value test against scoringrules Python output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions