forecast with regressors
tyokota opened this issue · 4 comments
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.
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
:
pydlm/pydlm/predict/dlmPredictMod.py
Line 86 in a2bbfd9
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.
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?
same here. I am confused to use featuredict. any example of using this will be good