在时间序列分析中,SARIMA(Seasonal autoregressive integrated moving average)和SARIMAX(SARIMA with exogenous variables)模型是常用的模型。它们可以用于预测时间序列数据,并且在许多实际应用中具有很高的准确性。 在本文中,将介绍如何使用Python来实现SARIMA和SARIMAX模型。首先,
ARIMA:传统上的ARIMA模型仅依赖于时间序列本身的历史值来进行预测,不直接支持外部变量的影响。 SARIMAX:允许引入外生变量(exogenous variables),即那些可能影响目标时间序列但不属于该序列内部结构的因素。例如,在预测销售量时,节假日、促销活动等外部因素可以通过外生变量的形式加入到模型中,以提高预测精度。 3.数学表示...
In the sarimax function, if i opt to use exogenous variables, you check its type, and if its not a Dataframe, transform it in one: Exogenous data self.k_exog = 0 if exog is not None: exog_is_using_pandas = _is_using_pandas(exog, None) if not exog_is_using_pandas: exog =...
2.5. Seasonal ARIMA with Exogenous Variables (SARIMAX) For the time series to be stationary, its characteristics must be stable across time, especially in the future. Therefore, it is impossible to consider any model’s results to be static if the time series being predicted is supposed to be...
The seasonal autoregressive integrated moving average with exogenous variables (SARIMAX) model is well documented in the study by Manigandan et al., in 2021, to forecast natural gas production and consumption in the United States [43], by Au et al., in 2020, to forecast power consumption in...