-
-
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
Add UnobservedComponents
statsmodels wrapper
#1394
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
In 68f920d I added the |
In 884828a I added the model into the online documentation. I think this draft PR is ready for a first review from the maintainers :) |
…z/sktime into unobserved_components
In 95ccf6e I added the doc-strings. Mostly taken from the ones in statsmodels. Again, I am not sure how much information should be added. Feedback is welcome :) |
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.
Hi @juanitorduz, I had a quick look and I think this looks very good! Only two minor comments. I haven't looked at the notebook changes yet.
Co-authored-by: Markus Löning <markus.loning@gmail.com>
Co-authored-by: Markus Löning <markus.loning@gmail.com>
Co-authored-by: Markus Löning <markus.loning@gmail.com>
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.
All looks good to me now! The links now also reader correctly and directly link to the statsmodels online docs! Thanks @juanitorduz
The Azure pipeline failures were due to #1415 but all resolved now.
I'll merge in the next couple of days if nobody else comments.
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 addition!
However, there are - probably accidentally - massive changes to the forecasting notebook!
These should be reverted before we merge.
Ups! by looking into https://app.reviewnb.com/alan-turing-institute/sktime/pull/1394/files/ I see that in the |
By looking into the diff and https://app.reviewnb.com/alan-turing-institute/sktime/pull/1394/files/ it seems juanitorduz@f2f939c and juanitorduz@9ff3d3f solved the problem. Remark (specially for future self XD): I had to clear the notebook output twice: (1) The first one in VSCode (my IDE) which actually changed a bit the notebook structure (json order?) and then (2) restart using Jupyter notebooks (Anaconda), which solved the "high" number of changes issue 😃 ! |
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.
Yes, thanks for fixing the notebook.
Unrelated, we may later want to add the automated estimator list to section 2, using all_estimators
- though that's better a separate PR.
Reference Issues/PRs
Fixes #1371
What does this implement/fix? Explain your changes.
This PR wraps the UnobservedComponents from statsmodels. We follow closely the existing implementation sktime/forecasting/ets.py using the
_StatsModelsAdapter
class (a minor change was added in order to supportexog
variables).Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
In this initial PR I provide a basic implementation of the wrapper. Still, I wanna make sure I understand what are the requirements the code needs in order to merge to
main
. Concretely here are my questions:Main Questions:
The docstrings of the original statsmodels class UnobservedComponents is very complete and gives a clear description of the model and the
level
variable which determines the structure of the state space model. How much should I add to the doctrings on thesktime
implementation?Which kind of test should I write? Probably a couple of test ensuring the statsmodels implementation agrees with this one.
Should I add this model to the
examples/01_forecasting.ipynb
notebook? Any other place where I should add more examples on this new estimator?Any other feedback or suggestion?
Minor Questions
plot_components
fils because aTypeError: float() argument must be a string or a number, not 'Period'
. Have you encounter this type of error in the past? It seems the internal plotting functions do not handlePeriod
types.For all contributions
For new estimators