I am trying to implement out of sample prediction using predict function of Pyflux package. But to my surprise instead of giving out of sample prediction, it returns in sample predicted values.Sample code below:
import pandas
import numpy as np
import datetime
import pyflux as pf
print('Version of Pyflux is %s'%(pf.__version__)) ## output= 0.4.15
minTime=datetime.datetime(2016,1,1)
maxTime=datetime.datetime(2016,6,1)
datetime_range=pandas.date_range(minTime, maxTime, freq='%dmin'%(30))
data=pandas.DataFrame(np.random.rand(datetime_range.shape[0],1),columns=list('A'))
data.index=datetime_range
model_py = pf.ARIMA(data=data, ar=1, ma=1, target='A', family=pf.Normal())
model_fit=model_py.fit('MLE')
model_py.predict(12,intervals=False)
If we check last 10 values of data DataFrame we get-
As per Pyflux package documentation, predict(h) should give how many step forecast ahead but model_py.predict(12,intervals=False) gives last 12 in-sample prediction of data DataFrame
I am trying to implement out of sample prediction using predict function of Pyflux package. But to my surprise instead of giving out of sample prediction, it returns in sample predicted values.Sample code below:
If we check last 10 values of
data
DataFrame we get-As per Pyflux package documentation,
predict(h)
should givehow many step forecast ahead
butmodel_py.predict(12,intervals=False)
giveslast 12 in-sample prediction
ofdata
DataFrameThis looks strange!!!