# How do I train residuals from ARIMA-ANN hybrid time series model?

Refer to G.Peter Zhang's research paper. In time series univariate, he proposed a hybrid model which is:

$\hat{y}=\hat{L} + \hat{N}$

where

• $\hat{L}$ is linear model which can be fitted by ARIMA(p,d,q).
• $\hat{N}$ is nonlinear model which can be fitted by ANN. In the paper, he used ANN $4\times4\times1$ structure (4 inputs x 4 hidden nodes x 1 output).

After fitting data with ARIMA. I get residuals from fitted ARIMA.

The number of input vector for ANN model is 4 while the residual is 1 vector. I applied $lag = 4$ to residuals to make 4 vectors which are:

$$\vec{v}_1: x_1,x_2,x_3,x_4$$ $$\vec{v}_2: x_2,x_3,x_4,x_5$$ $$\vec{v}_3: x_3,x_4,x_5,x_6$$ $$\vec{v}_4: x_4,x_5,x_6,x_7$$

After optimized ANN model, I extract weights, bias to make final equation.

For example, the hybrid model ARIMA(1,1,1) and ANN (4x4x1) equation are: $$y_t = \phi_1y_{t-1} - \theta_1e_{t-1} + e_t$$

I think $e_t =$ equation from $ANN(4\times4\times1)$ but I'm not sure.

What is equation for this hybrid approach ?