I am try to forecast 700 different product using autoARIMA in pmdarima package. For seasonality, Fourier Series makes it easier, because all products pattern are different.
But, how can I select different values of "k", based on product in a loop. Is there any test, or optimization function to do so?
pipe = Pipeline([
("fourier", FourierFeaturizer(m=12, k=3)),
("arima", pm.AutoARIMA(exogenous=None, start_p=1, d=None, start_q=1, max_p=3,
max_d=2, max_q=3, start_P=1, D=None, start_Q=1, max_P=2,
max_D=1, max_Q=2, max_order=10, m=12, seasonal=False,
stationary=False, information_criterion='aic', alpha=0.05,
test='kpss', seasonal_test='ocsb', stepwise=False, n_jobs=1,
start_params=None, trend=None, method=None, transparams=True,
solver='nm', maxiter=None, disp=0, callback=None,
offset_test_args=None, seasonal_test_args=None,
suppress_warnings=True, error_action='warn', trace=True,
random=False, random_state=20, n_fits=30,`enter code here`
return_valid_fits=False, out_of_sample_size=0, scoring='mse',
scoring_args=None, with_intercept=True))])
Please suggest. Thank you.
Below is the loop created to get the value of K for fourier transformation using minimal AIC. My data is at month frequency. It works for me.