python auto_arima - summary function

15 Views Asked by At

I would like to know how I can get the probabilities rows (forecast points Lo 80, Hi 80 etc.) for this model:

!pip install pmdarima
import pmdarima as pm
import requests
import numpy as np
import pandas as pd

dataset = pd.DataFrame(
{
"demand": np.array(list(range(1827))),
"kolumn1": np.array(list(range(1828, 3655))),
"kolumn3": np.array(list(range(1828, 3655)))
},
index = pd.date_range("20130101", periods=1827))

lol = dataset.resample('M').mean()

model = pm.auto_arima(lol['demand'],
                        m=12, seasonal=True,
                      start_p=0, start_q=0, max_order=4, test='adf',error_action='ignore',
                           suppress_warnings=True,
                      stepwise=True, trace=True)

train=lol[(lol.index.get_level_values(0) >= '2018-01-31') & (lol.index.get_level_values(0) <= '2018-06-30')]
test=lol[(lol.index.get_level_values(0) > '2018-06-30')]
test

model.fit(train['demand'])
forecast=model.predict(n_periods=4, return_conf_int=True)

print(summary(forecast))

Unfortunately, after calling the 'summary' function I get this error:

NameError Traceback (most recent call last) in <cell line: 30>() 28 forecastt=model.predict(n_periods=4, return_conf_int=True) 29 ---> 30 print(summary(forecastt))

NameError: name 'summary' is not defined

0

There are 0 best solutions below