# Biogas Production Prediction Based on Feature Selection and Ensemble Learning
## 4 Conclusions  
In this paper, a biogas prediction model based on feature selection and heterogeneous ensemble learning is proposed and applied to the prediction of biogas in anaerobic tanks in biogas power generation systems for the problem of ensemble planning and rational resource allocation. The correlation between the internal features of the system and the biogas production is analyzed, while different single-prediction models are trained and tested, and the variability of different primary learner combinations and the influence of meta-learners on the prediction performance of the model are comprehensively analyzed and compared.  
Figure 8: Histogram of the prediction error frequency distribution of stacking model.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & \multicolumn{2}{c}{**Average**} & & & \\
**Model** & **Primary Learner Set** & \begin{tabular}{c} **Error** \\ **Correlation** \\ **Coefficient** \\ \end{tabular} & \begin{tabular}{c} **MSE** \\ **Coefficient** \\ \end{tabular} & \
\begin{tabular}{c} **MAE** \\ **Coefficient** \\ \end{tabular} &
\begin{tabular}{c} **MAPE** \\ **Coefficient** \\ \end{tabular} \\ \hline Model 1 (proposed method) & **CatBoost, LSTM, SVR, RF** & **0.68** & **74.489** & **3.658** & **0.220** \\ Model 2 & CatBoost, LightGBM, XGBoost, SVR & 0.86 & 117.08 & 4.72 & 0.280 \\ Model 3 & CatBoost, LightGBM, LSTM, SVR & 0.745 & 84.54 & 4.63 & 0.224 \\ Model 4 & LightGBM, XGBoost, LSTM, RF & 0.8 & 104.97 & 4.20 & 0.254 \\ Model 5 & CatBoost, XGBoost, LSTM, SVR & 0.755 & 98.61 & 4.03 & 0.242 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Evaluation metrics for different combinations of primary learners.  
The results show that the prediction model gives full play to the advantages of different learners, improves the accuracy of the prediction model, more accurately responds to the change trend of system parameters, solves the problem of optimal results from a single model being difficult to obtain, and provides data support for the reasonable allocation of system resources and optimization of system structure in biogas power generation systems. In the future, the research on the number of primary learners selected can be continued in the prediction model selection to further optimize the prediction performance.  
Conceptualization, S.P., J.P. and X.L.; methodology, S.P. and J.P.; software, J.P. and L.G.; validation, J.P., L.G., Y.L. and H.H.; writing--original draft preparation, J.P. and L.G.; writing--review and editing. J.P., L.G., Y.L. and H.H.; supervision, S.P. and X.L. All authors have read and agreed to the published version of the manuscript.  
This research was supported in part by the National Natural Science Foundation of China (grant number: No. 62003218) and in part by the Stable Support Projects for Shenzhen Higher Education Institutions (grant number: No. 20220717223051001).  
Not applicable.  
The data presented in this study are available on request from the corresponding author (The data are not publicly available due to privacy).  
Author [PERSON] was employed by the State Grid Zhuzhou Power Supply Company. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.