## 3 Results
### Co\({}_{2}\) Concentration Prediction Performance Evaluation
When predicting the classroom CO\({}_{2}\) concentration for the next 50 min, its prediction performance is the weakest, with its \(MAE\), \(RMSE\), and \(MAPE\) increas  
Figure 11: Fitted results of the models on the datasets: (**a1**) RF-LSTM model training set, (**b1**) RF-LSTM model test set; (**a2**) RF-TPE-LSTM model training set, and (**b2**) RF-TPE-LSTM model test set. Figure 10: Loss function variation curve with the number of iterations. ing to 13.75, 28.16, and 2.73%, respectively, while its \(R^{2}\) decreases to 73.64%. These results indicate that the RF-TPE-LSTM has good prediction ability within a certain time range, and when the prediction time is reduced, its prediction ability is better. When observing shorter historical data (from 10 min to 30 min), the model's errors (_MAE_ and _RMSE_) increase, but they still remain at a relatively low level. In particular, the _MAPE_ values are relatively low, indicating that the model's predictions are relatively accurate. At the same time, the \(R^{2}\) values remain above 85%, showing that the model can explain the data variations well within a shorter time frame and has a high goodness of fit. This demonstrates that our prediction model has a high prediction accuracy and excellent explanatory power. To verify that the TPE algorithm can optimize the selection of hyperparameters for the RF-LSTM model, we set eight different hyperparameter combinations for the RF-LSTM model and compared the accuracy with that of the RF-TPE-LSTM. The calculation results are shown in Table 6.  
To determine the effect of different batch size hyperparameters on the RF-LSTM model, we changed its batch size and set the batch sizes of the RF-LSTM1, RF-LSTM2, RF-LSTM3, and RF-LSTM4 models to 256, 128, 64, and 32, respectively. From the results in Table 6, under the same conditions as those of the other hyperparameters, the RF-LSTM3 model yields the largest \(R^{2}\) value and the lowest _MAE_, _RMSE_, and _MAPE_ values, indicating that different batch sizes do affect the RF-LSTM model to a certain extent. To explore the effect of different dropout hyperparameters on the RF-LSTM model, we changed the dropout of the RF-LSTM model and set the dropout of the RF-LSTM5 and \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Model** & **Units** & **Dropout** & **Batch Size** & \(R^{2}\) & _MAE_ & _RMSE_ & _MAPE_ \\ \hline RF-TPE-LSTM & 42 & 0.133 & 110 & 98.02\% & 3.43 & 7.70 & 0.69\% \\ RF-LSTM1 & 64 & 0.100 & 256 & 92.00\% & 9.61 & 15.49 & 2.00\% \\ RF-LSTM2 & 64 & 0.100 & 128 & 91.52\% & 11.87 & 15.95 & 2.52\% \\ RF-LSTM3 & 64 & 0.100 & 64 & 95.64\% & 5.26 & 11.44 & 1.06\% \\ RF-LSTM4 & 64 & 0.100 & 32 & 83.95\% & 19.21 & 21.95 & 4.14\% \\ RF-LSTM5 & 64 & 0.200 & 64 & 93.17\% & 10.66 & 14.32 & 2.29\% \\ RF-LSTM6 & 64 & 0.300 & 64 & 89.38\% & 14.21 & 17.85 & 3.04\% \\ RF-LSTM7 & 32 & 0.100 & 64 & 93.04\% & 10.25 & 14.45 & 2.16\% \\ RF-LSTM8 & 128 & 0.100 & 64 & 91.86\% & 11.27 & 15.63 & 2.38\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Prediction accuracy comparison of models with different hyperparameters. Figure 12: Prediction performance of the RF-TPE-LSTM model. RF-LSTM6 models to 0.200 and 0.300, respectively. According to the results in the table, the RF-LSTM5 model outperforms the other models under the same conditions, confirming the need to optimize the selection of dropout hyperparameters for the models. Finally, to determine the effect of different unit values on the LSTM model, we changed the units of the RF-LSTM model and set the units of the RF-LSTM7 and RF-LSTM8 models to 32 and 128, respectively. The results in the table show that the fitting of the RF-LSTM7 model and the error evaluation are better than those of the RF-LSTM8 model while keeping the other hyperparameters constant. This result indicates the need to improve the unit value of the RF-LSTM model.