-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH] Add fit_kwargs to Prophet
#5597
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
Conversation
fit_kwargs to Prophetfit_kwargs to Prophet
fkiraly
left a comment
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.
Thanks!
Two requests:
- the
sklearninterface specification requires not mutating params after writing toself, see above - could you add a
get_test_paramsparameter set that involvesfit_params?
…timator specifications
@fkiraly Prophet does not document which parameters are accepted here. These could also change depending on the selected Stan backend. In this case, I would say that there are no interesting cases to add to For reference see my comment here: #2344 (comment) |
Well, that's odd - if we do not know a single example, are we sure it makes sense to add this as a parameter of the estimator? |
An example would be But maybe you can help me better understand what |
this is used purely in testing, to generate a set of instances so that the estimator - or the interface code - receives good coverage, see last points in So, if we add the forward dict, we should add an arbitrary example where it is not |
|
Got it! Then we can assume that the default stan backend will be used by prophet (cmdstanpy) and that these parameters will be passed down to cmdstanpy.CmdStanModel.optimize and cmdstanpy.CmdStanModel.sample |
|
@fkiraly Could you take a look at the current changes and let me know if there's anything that you'd still like me to address? Thanks in advance! |
fkiraly
left a comment
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, I think my change requests are addressed.
|
@fkiraly @yarnabrina thanks again for all the valuable input, attention to detail, and promptness in reviewing this! It's highly appreciated ❤️ |
Reference Issues/PRs
Fixes #2344
What does this implement/fix? Explain your changes.
Adds a dict
fit_kwargsparameter to the Prophet forecaster constructor. This dictionary is then passed down to theprophet.forecaster.Prophet.fitmethod.Does your contribution introduce a new dependency? If yes, which one?
No
Did you add any tests for the change?
Added a test that checks whether the correct kwargs are passed down to the
prophet.forecaster.Prophet.fitmethod.Any other comments?
No
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
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 reference
See here for further details on the algorithm maintainer role.
For new estimators
docs/source/api_reference/taskname.rst, follow the pattern.Examplessection.python_dependenciestag and ensureddependency isolation, see the estimator dependencies guide.