Feat/metric crps#3089
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3089 +/- ##
==========================================
- Coverage 96.30% 96.24% -0.07%
==========================================
Files 160 160
Lines 17263 17280 +17
==========================================
+ Hits 16625 16631 +6
- Misses 638 649 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Checklist before merging this PR:
Note: this is a continuation of @Boubker10 's work on #3088.
Fixes #1112.
Summary
Added two new metrics for probabilistic time series forecasting:
crps(Continuous Ranked Probability Score): a per-time-step proper scoring rule that measures the compatibility of a predictive sample distribution with a scalar observation. Reduces to the Absolute Error (AE) when all samples are identical.mcrps(Mean CRPS): mean ofcrpsover the time axis, analogous to MAE for probabilistic forecasts.Both metrics follow the existing metric API (support for
component_reduction,series_reduction,time_reduction, multi-ts, multivariate).Other Information
Formula used (energy score formulation):
CRPS = (1/N) * Σ|x_i - y| - (1/(2N²)) * Σ_i Σ_j |x_i - x_j|
Tests added in
darts/tests/metrics/test_metrics.pycovering: