Esc
Ask AIAnswers may be inaccurate; check the linked pages.Esc
Ask anything about these docs, like how to get started or what a function does.

WeightedIntervalScore

chronax.metrics.weighted_interval_score.WeightedIntervalScore · inherits BaseMetric

Calculates the Weighted Interval Score (WIS) for deciles.

The Weighted Interval Score is a proper scoring rule for probabilistic forecasts that evaluates prediction intervals at multiple confidence levels. It combines sharpness (interval width) and calibration (coverage) into a single score.

Mathematical formula: WIS_A = Σ_{α∈A} α * IS_α([l_α, u_α], y)

Where: - IS_α = (u_α - l_α) + (2/α) * dist(y, [l_α, u_α]) - l_α = F⁻¹(α/2) and u_α = F⁻¹(1 - α/2) are the quantiles from samples - dist(y, [l_α, u_α]) = max(0, max(l_α - y, y - u_α)) is the distance penalty - α is the significance level for each prediction interval

The score rewards narrow intervals (sharpness) and penalizes when the true value falls outside the prediction interval (calibration).

__init__(self)

Initializes the metric, setting its type to "stochastic".

(No user-facing parameters)