The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

How to predict values TimeSeries?

How to predict values TimeSeries?

Super Learner
0
Votes
1
Answer

Dear Team,
Could you please help me with the following question?
I have seen all the course but i am still not able to Predict with future data,
I meant, I have the model created with auto_arima and SARIMAX, but when i try to insert future data it doesn’t show me anything.
Maybe i am not doing it in a good way, could you please send me an example how to predict future data when the data contains minutes?
Like this: 2020-07-27 00:00:00+01:00
And as end date: 2020-07-27 17:20:00+01:00

KeyError: 'The `start` argument could not be matched to a location related to the index of the data.'

Thank you for your help
 

I am also trying with the excercise by using this code:
df_pred_armax = results_ret_armax.predict(start = “2015-01-01”, end = “2015-01-10”,
exog = np.column_stack((np.array(range(9)),np.array(range(9)),np.array(range(9)))))
But it shows this error:
IndexError: index 9 is out of bounds for axis 0 with size 9

2 months
1 Answer

365 Team
0
Votes

Hey, Miguel!
 
I think the issue here is the frequency of the data. If you’re using data points of up to minutes (instead of days like we do in the course), you need to specify that when setting the frequency. 
 
 
Here is a list of some of the most commonly used frequencies:
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases
 
Additionally, when you’re importing your data, are you making sure it’s converting to a datetime type which includes hours and minutes, rather than stops at days? Here is a link to the to_datetime functions, which helps us convert imported dataset entries (usually saved as strings) into dates. 
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html
 
 
Try to set the frequency to minutes and let me know if the issue is resolved. Otherwise, please provide some snippets of your, so I can have a better idea of where the code crashes. 
 
Best,
365 Vik

×
LAST CHANCE
Ready to Learn Data Science?
50% OFF