-
-
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
Theta forecaster and prediction intervals #198
Merged
Merged
Conversation
This file contains 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
…e/sktime into theta-forecaster
mloning
reviewed
Jan 30, 2020
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.
Great work! I've added a few minor comments!
mloning
reviewed
Jan 31, 2020
… into theta-forecaster
Nice, great work! |
Workstream: forecasting and series transformers
automation
moved this from Review in progress
to Done
Feb 3, 2020
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
#67 #97
What does this implement/fix? Explain your changes.
Includes:
ThetaForecaster
which implements the Theta method.ThetaForecaster
.datasets.load_airline
- the Box/Jenkins airline passengers dataset. I thought this provided a clearer example of simple, univariate, seasonal data than some of the other datasets currently in sktime.BaseForecaster
to enable prediction intervals to be calculated:prediction_errors
. Currently this has only been implemented forThetaForecaster
. Running this method for any other forecaster will raise aNotImplementedError
.predict()
and providing one or many confidence levels. This will cause the method to return a tuple of predictions and errors, instead of just predictions.plot()
convenience method for forecasters. As well as plotting the forecasts (optionally alongside any training/test data), it will also plot prediction intervals if available for that forecaster.simple_forecasting.ipynb
, to demonstrate all of the above.Any other comments?
Other projects I looked at like as
pmdarima
and R'sforecast
library return upper and lower bounds for prediction intervals. I've opted for a different approach though, of just doing the bare minimum and calculating the forecast point errors and returning this as a single series. It's then trivial to apply this to your forecasts to obtain the intervals. This is what the newplot()
method does under the hood. I think it should still be fairly easy to interface with some of these other packages even with this different approach but please let me know if you disagree.FYI,
prediction_errors
supports the calculation of producing PIs at different confidence levels, something that was discussed in #97. It also allows each forecaster to define its own methods for PI calculations. I didn't attempt to implement this for any of the other forecasters as this could be quite a lot of code for some of them (in the case of ETS forecasting, I believe some models don't even have a known formula - for this reason I implemented the interface in a way that makes it optional).I thought about merging in the new notebook with the existing forecasting notebook, but wasn't sure how to best make them fit together. I'm happy to take a steer on this if you'd prefer me to put all the forecasting stuff in a single notebook before merging the PR.
PR checklist