add Winkler metric#310
Merged
ContiPaolo merged 2 commits intomainfrom Apr 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ensemble evaluation metric (Winkler Interval Score) to quantify prediction interval sharpness/coverage tradeoffs, integrating it into the metrics registry, evaluation CLI defaults, and unit tests.
Changes:
- Implemented
WinklerScoreas a newBTSCMMetricensemble metric based on ensemble quantiles. - Registered the metric in
autocast.metricsexports and the encoder/processor/decoder eval script metric registry/default list. - Added unit tests covering a hand-computed reference case and
alphaparameter validation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/autocast/metrics/ensemble.py |
Adds WinklerScore implementation and its docstring/shape conventions. |
src/autocast/metrics/__init__.py |
Exports and registers WinklerScore in ALL_ENSEMBLE_METRICS. |
src/autocast/scripts/eval/encoder_processor_decoder.py |
Makes winkler available in the eval CLI and adds it to default metrics. |
tests/metrics/test_ensemble.py |
Adds correctness and input-validation tests for WinklerScore. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@sgreenbury Comments on computational cost: Winkler (#286) vs Variogram(#285)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #286 by implementing Winkler metric
Summary of Changes
WinklerScore) as a new ensemble metric inensemble.py.Winkler Interval Score Definition
The Winkler interval score evaluates the sharpness and coverage of central prediction intervals. For significance level$\alpha \in (0, 1)$ , the score for a single point is:
where:
Lower values are better: narrow intervals are rewarded, and misses are penalized in proportion to their distance outside the interval.
The implementation supports flexible reduction over spatial/temporal dimensions and returns the mean Winkler score by default.