## 4 Results and Discussion
### Performance Evaluation  
For the performance comparison of the stacking ensemble model, we selected and designed LSTM, BI-LSTM, and GRU as the performance evaluation targets for the base models. The input data included humidity, CO\({}_{2}\), soil temperature, insolation, and drainage pH, which exhibited significant correlations with air temperature.  
The base models of the stacking ensemble had an input sequence length of 5 and a layer configuration of 64, 32, 8, 1. Consequently, the LSTM, BI-LSTM, and GRU models, which were the subjects of performance evaluation, were designed with the same input sequence and layer configuration. Figure 22 shows the model architectures of LSTM, BI-LSTM, and GRU. The dataset was divided into training, testing, and validation sets, following an 8:1:1 ratio. The models were trained using the Adam optimizer for 100 epochs, with a batch size of 16. To mitigate overfitting, early stopping was incorporated as a regularization technique during the training phase.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Value (Absolute Value)** & **Equipment and Device** \\ \hline
0.9–1.0 & Very strong positive(negative) correlation \\
0.7–0.9 & Strong positive(negative) correlation \\
0.5–0.7 & Moderate positive(negative) correlation \\
0.3–0.5 & Weak positive(negative) correlation \\
0.1–0.3 & Very Weak positive(negative) correlation \\
0.0–0.1 & Almost no positive(negative) correlation \\ \hline \hline \end{tabular}
\end{table}
Table 1: Correlation coefficient value.  
Figure 21: Correlation Heatmap.  
The model's performance was assessed using the validation data, employing evaluation metrics such as mean squared error (MSE), mean absolute error (MAE), and R-squared. The MSE, MAE, and R-squared are shown in Equations (14), (15) and (16), respectively:  
\[\text{MSE}=\frac{1}{n}{\sum_{i=1}^{n}}(y_{i}-\hat{y}_{i})^{2}, \tag{14}\]  
\[\text{MAE}=\frac{1}{n}{\sum_{i=1}^{n}}(|y_{i}-\hat{y}_{i}|), \tag{15}\]  
\[\text{R}^{2}=1-\frac{\sum_{i=1}^{n}}{\sum_{i=1}^{n}}(y_{i}-\hat{y}_{i})^{2}. \tag{16}\]  
where \(n\) represents the size of the data, \(y\), \(\hat{y}\), and \(\bar{y}\) represent the actual air temperature values, model-predicted air temperature values, and the average of model-predicted air temperature, respectively. \(y_{i}\) and \(\hat{y}_{i}\) represent the \(i^{th}\) value of \(y\) and \(\hat{y}\), respectively [59,60].  
Figures 23-26 show the air temperature prediction results using the validation data for the Stacking ensemble, LSTM, BI-LSTM, and GRU models, respectively. The corresponding MSE, MAE, and R-squared values for each model are presented in Table 2.  
Figure 23: A prediction result of air temperature using stacking ensemble.  
Figure 22: Model architectures for LSTM, BI-LSTM, and GRU.  
The performance evaluation results of the stacking ensemble, LSTM, BI-LSTM, and GRU models indicate that the stacking ensemble model achieved an MSE of 0.594, MAE of 0.601, and an R-squared value of 0.958. The LSTM model achieved an MSE of 0.668, MAE of 0.623, and an R-squared value of 0.953. The BI-LSTM model achieved an MSE of 0.772, MAE of 0.670, and an R-squared value of 0.946. The GRU model achieved an MSE of 0.720, MAE of 0.639, and an R-squared value of 0.950. Overall, the stacking ensemble model exhibited superior performance compared to the LSTM, GRU, and BI-LSTM models.