-
Hi, So I trained my model on the training data already and used the following code to compare the forecast with the test data, which is working fine. However, I am trying to extract the forecasted data only without using test data. I tried using fewer historical data, as I don't want to flood the database I am using, but the prediction accuracy became worse: I have an online application, where I predict the next 48 hours (587 points). I do this prediction every time step (5 min). So I guess I have two questions:
Forecast vs test data code (working fine)
I tried this line of code: Trying to extract the forecast without testdata (not working)
I get an error that the"'str' object has no attribute 'copy" referring to an inner function. I have been trying and I did dir on the function to try different commands, but nothing. I think it should be simple, but I need some guidance here as to what to try. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When using the The reason is the predict function expects the future features inside feat_dynamic_real to be able to predict. Therefore, the code should be as follows:
Then train your model normally. After training the model, use the following code, make sure you use the same training dataset, but add to the 'feat_dynamic_real' the prediction horizon. The prediction function needs this data to predict since 'feat_dynamic_real' was set to true in the estimator.
Otherwise you would get mismatch in the dimensions of the matrices input to the predictor.predict. Good luck! |
Beta Was this translation helpful? Give feedback.
When using the
predictor.predict
function, you need to update the training data input to it, if you are using feat_dynamic_real.The reason is the predict function expects the future features inside feat_dynamic_real to be able to predict. Therefore, the code should be as follows:
The key is how to setup the training dataset