## 4 Materials and Methods
### Introduction to ARIMA Algorithm  
ARIMA (AutoRegressive Integrated Moving Average) is a classic time series forecasting method, widely used in time series data analysis and prediction in fields such as economics, meteorology, and engineering. It captures the dynamic patterns of time series by combining three mechanisms: AutoRegression (AR), Integration (I), and Moving Average (MA) [45].  
The complete representation of an ARIMA model is ARIMA(p, d, q), where the three parameters correspond to the three core components of the model. It is more suitable for capturing linear dependencies and has limited performance for nonlinear sequences with sharp changes.  
p: The number of autoregressive terms (AutoRegressive), representing the linear dependence of the current value on the values of the past p time steps.  
d: The order of differencing (Integrated), which makes the original sequence stationary by differencing it d times (a prerequisite for time series forecasting).  
q: The number of moving average terms (Moving Average), representing the linear dependence of the current value on the error terms of the past q time steps.  
The default value of the parameter d in the function is 0 (indicating the assumption that the original sequence is stationary). First, an ADF stationarity test is performed on the original sequence. If the sequence is non-stationary (\(p\)-value > 0.05), a 1 st-order differencing is applied (d = 1), and the stationarity is tested again. If the sequence remains non-stationary after 1 st-order differencing, a 2 nd-order differencing is performed (d = 2).  
\begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Model** & **Optimizer** & **Loss Function** & **Training Parameters** & **Regularization** & **Single-Step Time** & **Total Params** \\ \hline LSTM & [PERSON] loss & Epochs = 50, & & & \\  & & Batch\_size = 64 & Dropout (0.3) & 20 ms/step & 29,857 \\ RNN & Adam & huber loss & Epochs = 50, & & & \\  & & Batch\_size = 64 & Dropout (0.3) & 12 ms/step & 7873 \\ FNN & Adam & huber loss & Epochs = 50, & & & \\  & & Batch\_size = 64 & Dropout (0.3) & 3 ms/step & 3969 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Statistical table of model training and optimization parameters.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Model** & **Model Architecture** & **Activation Function** & **Input Shape** \\ \hline \multirow{4}{*}{LSTM} & Input layer \(\rightarrow\) LSTM (64, return\_sequences = True) \(\rightarrow\) Dropout \(\rightarrow\) LSTM & ReLU (Fully connected layer) & (Number of samples, \\  & (32, return\_sequences = True) \(\rightarrow\) Dropout \(\rightarrow\) Dense (16) \(\rightarrow\) Output layer (1) & Tanh (LSTM layer) & Steps = 20) \\  & \(\rightarrow\) Input layer \(\rightarrow\) SimpleRNN & & \\ RNN & (64, return\_sequences = True) \(\rightarrow\) Dropout \(\rightarrow\) Dense & ReLU (Fully connected layer) & (Number of samples, \\  & \(\rightarrow\) SimpleRNN (32) \(\rightarrow\) Dropout \(\rightarrow\) Dense (16) \(\rightarrow\) Output layer (1) & Tanh (SimpleRNN layer) & Steps = 20) \\ \multirow{4}{*}{FNN} & Input layer \(\rightarrow\) Dense1 (64) \(\rightarrow\) Dropout \(\rightarrow\) Dense3 (16) \(\rightarrow\) Output layer (1) & ReLU & (Number of samples, \\  & & & \\ \cline{1-1}  & & & & \\ \cline{1-1}  & & & & \\ \cline{1-1}  & & & & \\ \cline{1-1}  & & & & \\ \end{tabular}
\end{table}
Table 5: Summary table of training model architectures.  
The ARIMA algorithm described in this paper uses the initial parameter ARIMA(2, d, 1) (where p = 2, d is determined according to the differencing order, and q = 1).  
The model is fitted based on the training set data, and parameters are optimized by minimizing the AIC (Akaike Information Criterion).