Open GuillaumeLeclerc opened 7 years ago
Taking a look at this today!
Is this issue not fixed? It still seems to be an open bug....:)
how to fix this issue ? it seems that pro has not been solved, as now it's still backward prediction when using model.predict()
Hi, any news on this one?
I believe I found where the bug lies. The method shift_dates
of the TSM
class is currently not working with pandas datetime index. The code on line 541
(date_index[len(date_index)-1] - date_index[len(date_index)-2]).seconds
will always return the number of seconds in the timedelta object (by documentation >= 0 and < 1 day), not the number of total seconds between the dates. To fix it just simply use:
date_index += pd.DateOffset(seconds=(date_index[len(date_index)-1] - date_index[len(date_index)-2]).total_seconds())
@ryshoooo 's solution is spot on and worked for me. Only thing is that we have to change the code from line 538:
if pd.infer_freq(date_index) in ['H', 'M', 'S',]:
to
if pd.infer_freq(date_index)[-1] in ['H', 'M', 'S','T']:
Hello,
I was trying out the library and fit a simple ARMA(4, 4) model. I tried running predictions and it seems the dates of the output are completely wrong.
Is is a known bug or I did something wrong ?