带有2D或3D系列的ARIMA

时间:2019-05-09 02:01:05

标签: arima

现在我有一个序列,其形状类似于图像序列,即(t,2,w,h),我想将此数据集与ARIMA一起应用以预测时间戳t + 1的值,即。 (t + 1、2,w,h),时间戳t + 1的预测值是二维的,但是statsmodel中的ARIMA模型需要输入1维的形状,如何解决此问题? 这是statsmodel.tsa.arima_model的实现:https://www.statsmodels.org/stable/_modules/statsmodels/tsa/arima_model.html#ARIMA

def _fit_start_params_hr(self, order, start_ar_lags=None):
        """
        Get starting parameters for fit.

        Parameters
        ----------
        order : iterable
            (p,q,k) - AR lags, MA lags, and number of exogenous variables
            including the constant.
        start_ar_lags : int, optional
            If start_ar_lags is not None, rather than fitting an AR process
            according to best BIC, fits an AR process with a lag length equal
            to start_ar_lags.

        Returns
        -------
        start_params : array
            A first guess at the starting parameters.

        Notes
        -----
        If necessary, fits an AR process with the laglength start_ar_lags, or
        selected according to best BIC if start_ar_lags is None.  Obtain the
        residuals.  Then fit an ARMA(p,q) model via OLS using these residuals
        for a first approximation.  Uses a separate OLS regression to find the
        coefficients of exogenous variables.

        References
        ----------
        Hannan, E.J. and Rissanen, J.  1982.  "Recursive estimation of mixed
            autoregressive-moving average order."  `Biometrika`.  69.1.

        Durbin, J. 1960. "The Fitting of Time-Series Models."
        `Review of the International Statistical Institute`. Vol. 28, No. 3
        """
        p, q, k = order
        start_params = zeros((p+q+k))
        # make copy of endog because overwritten
        endog = np.array(self.endog, np.float64)

输入endg的地方

0 个答案:

没有答案