Conrado Mco07/21/2023, 6:04 PM
from statsforecast.utils import AirPassengers as ap from statsforecast.models import ARIMA import numpy as np # ARIMA arima_p = np.arange(3) arima_d = np.arange(3) arima_q = np.arange(3) for p in arima_p: for d in arima_d: for q in arima_q: if (p + d + q) > 0: arima = ARIMA(order = (p, d, q), season_length = 12) arima.fit(y=ap)
Kevin Kho07/21/2023, 6:11 PM
but these are
You can fix this by casting d, q, and p to int.
arima_p = [int(x) for x in np.arange(3)]
Conrado Mco07/21/2023, 6:23 PM