Repository navigation
[ENH] Chen & Yang (2004) forecast accuracy metrics (#8681) - #9364
Merged
Merged
Conversation
michaelellis003
requested review from
benHeid,
felipeangelimvieira,
fkiraly and
yarnabrina
as code owners
February 12, 2026 23:32
fkiraly
requested changes
Feb 13, 2026
fkiraly
left a comment
Collaborator
There was a problem hiding this comment.
Very nice!
There are a few code formatting issues, could you kindly run pre-commit on your new files?
Add 7 metrics from Chen & Yang (2004): msMAPE, NMSE, IQR, KL-N, KL-DE1, KL-DE2, and Theil U2. Includes base class for KL-DE variants, unit tests, API reference docs, and doctest exclusions.
Add __author__ and _tags author attribution to all 7 Chen & Yang metrics. Improve comments explaining jackknife LOO logic and population variance computation. Add LaTeX docstring to KL-DE base class. Add sp > n validation in TheilU2. Add test for evaluate_by_index index correctness on jackknife metrics.
michaelellis003
force-pushed
the
feat/msmape-metric
branch
from
February 14, 2026 05:03
87d6000 to
355029b
Compare
Contributor
Author
Ran pre-commit. Should be good now. Thanks! |
fkiraly
requested review from
SimonBlanke,
geetu040,
jgyasu and
marrov
as code owners
July 26, 2026 15:57
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.
Reference Issues/PRs
Fixes #8681
What does this implement/fix? Explain your changes.
Adds 7 forecast accuracy metrics from Section 4 of Chen & Yang (2004) "Assessing Forecast Accuracy Measures":
All metrics support multioutput, evaluate, and evaluate_by_index. Metrics with non-linear aggregation (NMSE, IQR, KL-N, TheilU2) use jackknife leave-one-out pseudo-values for evaluate_by_index. Linear-mean metrics (KL-DE1, KL-DE2, msMAPE) return per-index values directly.
Files added/changed:
Does your contribution introduce a new dependency? If yes, which one?
No.
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Yes:
Any other comments?
No.
PR checklist
For all contributions
sktimeroot directory (not theCONTRIBUTORS.md). Common badges:code- fixing a bug, or adding code logic.doc- writing or improving documentation or docstrings.bug- reporting or diagnosing a bug (get this pluscodeif you also fixed the bug in the PR).maintenance- CI, test framework, release. See here for full badge referencemaintainerstag - do this if you want to become the owner or maintainer of an estimator you added. See here for further details on the [algorithm maintainer role (https://www.sktime.net/en/latest/get_involved/governance.html#algorithm-maintainers).For new estimators
docs/source/api_reference/taskname.rst, follow the pattern.Examplessection.python_dependenciestag and ensured dependency isolation, see the [estimator dependencies guide (https://www.sktime.net/en/latest/developer_guide/dependencies.html#adding-a-soft-dependency).