-
Notifications
You must be signed in to change notification settings - Fork 530
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
Fixing Sarima with exogenous variables #75
Closed
Closed
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
replace githuns with githubs
…ict function to the underlying statsmodels SARIMAX.get_forcast function
…o facebookresearch-master
We also weren't sure if we should allow exog to be passed as a named parameter or a kwarg, so here is the code for the kwarg version if that's preferred: if (self.params.exog is not None) and (kwargs.get('exog') is None):
msg = "SARIMA model was initialized with exogenous variables. Exogenous variables must be used to predict. use `exog=`"
logging.error(msg)
raise ValueError(msg)
fcst = self.model.get_forecast(steps, exog=kwargs.get('exog')) |
@iamxiaodong has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@jeffhandl merged this pull request in 90b69ed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
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.
When using SARIMA it would not pass exogenous variables to the underlying
statsmodels.tsa.statespace.sarimax.SARIMAXResults
function.Added a check to ensure the user provides the exogenous variable needed for forecasting if they provided an exogenous variable in the SARIMAParams initialization.
Added test cast for exogenous variable with a daily frequency
I'm not exactly sure how to update the documentation since this added a new parameter to the
kats.models.SARIMA.predict
function and would like further guidance on how to do so.Kats
Thank you for contributing! Please take a moment to review our contributing guidelines
to make the process easy and effective for everyone involved.
Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
Complete your CLA here: https://code.facebook.com/cla
Ver: Kats v1.02