Apr-29-2024, 10:32 AM
Hi all,
I'm a bit new to pyhton. In my jupyter lab code, I'm working on time series project. The code below doesn't give last 2 prediction from test tes (I should have 2 more prediction as last 2 rows of test set). I cannot find where the problem is although I tried many things. I would really appreciate If you can help and have and idea on it? I attach it as picture as well as the codes below.
start=len(train)
end=len(train)+len(test)-1
pred=model_fit.predict(start=start,end=end,typ='levels').rename('SARIMA predictions')
pred.plot(legend=True)
test['Mindex'].plot(legend=True)
print(pred)
2023-01-01 96.906580
2023-02-01 101.013176
2023-03-01 110.153657
2023-04-01 107.056124
2023-05-01 110.506556
2023-06-01 112.223209
2023-07-01 106.282959
2023-08-01 106.446757
2023-09-01 110.362227
2023-10-01 114.193317
Freq: MS, Name: SARIMA predictions, dtype: float64
I'm a bit new to pyhton. In my jupyter lab code, I'm working on time series project. The code below doesn't give last 2 prediction from test tes (I should have 2 more prediction as last 2 rows of test set). I cannot find where the problem is although I tried many things. I would really appreciate If you can help and have and idea on it? I attach it as picture as well as the codes below.
start=len(train)
end=len(train)+len(test)-1
pred=model_fit.predict(start=start,end=end,typ='levels').rename('SARIMA predictions')
pred.plot(legend=True)
test['Mindex'].plot(legend=True)
print(pred)
2023-01-01 96.906580
2023-02-01 101.013176
2023-03-01 110.153657
2023-04-01 107.056124
2023-05-01 110.506556
2023-06-01 112.223209
2023-07-01 106.282959
2023-08-01 106.446757
2023-09-01 110.362227
2023-10-01 114.193317
Freq: MS, Name: SARIMA predictions, dtype: float64