Data Science, Machine Learning, Time Series Analysis, Analytics, Linear Regression.
are more rigorous ways to determine the parameters, in this particular instance, we use the pragmatic approach of grid search and choose the model based on the lowest resulting AIC (Akaike Information Criterion) score. from statsmodels.tsa.statespace.sarimax import SARIMAX # import SARIMA function