## 4 Discussion  
The purpose of this study was to construct a CO\({}_{2}\) concentration prediction model based on the screening of influencing factors affecting the CO\({}_{2}\) concentration in classrooms, aiming to create a comfortable and efficient classroom environment. We initially performed data preprocessing operations on the collected datasets and identified the factors influencing CO\({}_{2}\) concentrations using the RF algorithm. Then, we developed an RF-LSTM model using the final dataset obtained from the screening process. Following hyperparameter optimization with the Bayesian optimization algorithm, TPE, we introduced the RF-TPE-LSTM model. We then used both models to predict the indoor CO\({}_{2}\) concentration before and after hyperparameter optimization. The calculation results revealed that the NH\({}_{3}\) concentration in the classroom was not an input variable to the CO\({}_{2}\) prediction model. Furthermore, the prediction model exhibited excellent fit with the dataset. In addition, we analyzed the prediction performance of the RF-TPE-LSTM model over time using four evaluation metrics, namely, the \(R^{2}\), _MAE_, _RMSE_, and _MAPE_, which showed that the model has good prediction ability within a certain time range. After evaluating the RF-LSTM and RF-TPE-LSTM with different combinations of hyperparameters, it is concluded that the RF-TPE-LSTM model obtains smaller errors and better \(R^{2}\) values when predicting the CO\({}_{2}\) concentration in classrooms. Specifically, compared to the RF-LSTM, the RF-TPE-LSTM model reduces the _MAE_ from 8.27 to 2.96, the _RMSE_ from 11.71 to 5.54, and the _MAPE_ from 1.79% to 0.60%. This indicates that the hyperparameter optimization we used has a significant effect on improving accuracy. Subsequently, we conducted experiments using the RNN, BPNN, and Optuna-LSTM models; the results indicated that the prediction accuracies of these models improved after considering the influencing factors. Therefore, the use of the RF algorithm to filter the model inputs has some versatility for multiple algorithmic models. Notably, the \(R^{2}\) of the RF-TPE-LSTM model exceeded 98%, indicating its strong ability to predict CO\({}_{2}\) concentrations in classrooms. In summary, the key findings of this study are as follows:  
1. The model developed in this research demonstrates high accuracy in forecasting classroom CO\({}_{2}\) concentrations. 2. The predictions made by the RF-TPE-LSTM model are more robust and efficient than those made by single models or models using only one optimization algorithm. 3. The RF-TPE-LSTM model combines RF for feature importance analysis, TPE for hyperparameter tuning, and LSTM for time series prediction. This integration not only highlights the most significant factors influencing CO2 levels but also fine-tunes the model's hyperparameters, such as the number of units, learning rate, and training epochs. The collaboration of these techniques enhances the model's capability to adapt to the dynamic variations in classroom environments, leading to better prediction accuracy and reliability. Consequently, the model proposed in this paper can serve as an effective method for predicting CO2 concentrations in classrooms, providing valuable data support for ventilation strategies aimed at controlling indoor CO2 concentrations. Decision-makers responsible for controlling the physical environment of classrooms can also use our proposed CO2 concentration prediction model to proactively utilize air-conditioning systems for ventilation, ensuring a comfortable learning environment [46; 47]. Although our CO2 concentration prediction model has achieved excellent results, we aim to address some practical issues in future work. For instance, we can develop an intuitive visualization interface to display historical CO2 concentration data, prediction results, and model performance, making it easier for users to understand and use. This work can serve as an important component in the automatic ventilation control of CO2 concentration in classrooms.