Skip to content
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

forecast with regressors #38

Open
tyokota opened this issue Sep 10, 2019 · 4 comments
Open

forecast with regressors #38

tyokota opened this issue Sep 10, 2019 · 4 comments

Comments

@tyokota
Copy link

tyokota commented Sep 10, 2019

Is it possible to forecast with regressors such as in the Google example? I first split the data into a train and valid set. I fit the train set. Then I conform the valid set regressors into a dictionary as such:

new_dict = {k:list(df[k].unique()) for k in df.columns}

However, I am seeing a NameError: The step is out of range error.

@wwrechard
Copy link
Owner

Yes, it's possible, but you need to supply the data to the regressor before making prediction. The out of range error is caused by insufficient data in the regressor.

May I know how you supply the new features into the model? One way to do is via predictN and featureDict:

def predictN(self, N=1, date=None, featureDict=None):

@logisticregress
Copy link

I'm having the same issue.
I have one predictor, and I'm trying to forecast out 3 days, so I've
newf = {'x2':[[-0.13064217],[-0.13064217],[-0.13064217]]}

(predictMean, predicrVar) = drm.predictN(N=3,date=drm.n-1, featureDict=newf)

NameError: The step is out of range

I'm not sure what I'm doing wrong in setting up the future values of the predictor variable.

@Jill07217
Copy link

Same here.

I try to output 12 months ahead (N=12) with the featureDict having 12 dynamic components. But I still get the NameError: The step is out of range. Could you please provide any insights?

@ramdhan1989
Copy link

same here. I am confused to use featuredict. any example of using this will be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants