'Implementing SARIMAX in Python gives 0%| | 0/256 [00:00<?, ?it/s]
I am trying to implement the following code in Python from this article.
Here is my code snippet.
def optimize_SARIMA(parameters_list, d, D, s, exog):
results = []
for param in tqdm_notebook(parameters_list):
model = SARIMAX(exog, order=(param[0], d, param[1]), seasonal_order=(param[2], D, param[3], s)).fit(disp=-1)
aic = model.aic
results.append([param, aic])
result_df = pd.DataFrame(results)
result_df.columns = ['(p,q)x(P,Q)', 'AIC']
#Sort in ascending order, lower AIC is better
result_df = result_df.sort_values(by='AIC', ascending=True).reset_index(drop=True)
return result_df
p = range(0, 4, 1)
d = 1
q = range(0, 4, 1)
P = range(0, 4, 1)
D = 1
Q = range(0, 4, 1)
s = 4
parameters = product(p, q, P, Q)
parameters_list = list(parameters)
result_df = optimize_SARIMA(parameters_list, 1, 1, 4, yValues)
yValues for me is just a list of integers. It keeps outputting this to the console:
0%| | 0/256 [00:00<?, ?it/s]
I cannot figure out why this is.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
