-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Modified VAR code to allow predict_quantiles of 0.5 (fixes #4742) #6441
Conversation
# A hacky way to coerce error-inducing alpha==1 into its approximant | ||
if alpha >= 0.99999: | ||
alpha = 0.99999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts: can/should we document this hack for users, and if so, where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think docstring modifications in these file do not get shown in read the docs. These are private methods (starting with _), and what all gets shown is only those of the base class.
Please let me know if this a misunderstanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, the class docstring, that gets overridden.
…tonio/sktime into var_0.5_quantile_error Merging
@@ -2649,7 +2649,8 @@ | |||
"avatar_url": "https://avatars.githubusercontent.com/u/37468543?v=4", | |||
"profile": "https://github.com/meraldoantonio", | |||
"contributions": [ | |||
"doc" | |||
"doc", | |||
"bug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"bug"
is for diagnosing or reporting bugs, but not bugfixes. Bugfixes fall under the "code"
badge, so you can add both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging for release. Since not blocking, the updates to docstring can be made in separate PR. |
Reference Issues/PRs
Fixes #4742
What does this implement/fix? Explain your changes.
Previously, VAR produced an error when predicting quantiles with an alpha of 0.5. This issue arose because alpha was converted to a coverage of 1.0 in
_base
, which was then reconverted to an alpha ("internal alpha") of 1.0 inside VAR's_predict_interval
. An internal alpha of 1.0 is outside the acceptable range (0.0 to 1.0 exclusive) for statsmodels VAR.This change hackily coerces an internal alpha of 1.0 to 0.99999 to avoid this error.
Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
The hacky nature of this change
Did you add any tests for the change?
No
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
sktime
root 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 pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
maintainers
tag - 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.