DOI: 10.1002/wer.70527 ISSN: 1061-4303

Prediction, Optimization, and Uncertainty Quantification of Methylene Blue Removal by Biochar Adsorbents Using Ensemble Machine Learning

Gokulan Ravindiran, Gorti Janardhan, Marlinda Abdul Malek, Mary Subaja Christo, Deepshikha Datta, Ali. E. I. Elkhalifah, Gasim Hayder

ABSTRACT

This study developed an integrated and uncertainty‐aware machine learning framework to predict and optimize methylene blue (MB) removal efficiency using biochar adsorbents. A dataset comprising 504 literature‐derived adsorption experiments was compiled using five operational parameters, namely, initial dye concentration, contact time, initial pH, adsorbent dosage, and temperature. Four advanced ensemble learning models, namely, XGBoost, CatBoost, LightGBM, and stacking ensemble, were developed and evaluated. The stacked ensemble model achieved the highest predictive performance with R 2  = 0.7740, RMSE = 7.95, and MAPE = 7.04%, demonstrating the ability to capture complex nonlinear adsorption processes. Explainable artificial intelligence (XAI) analysis using SHAP identified temperature, contact time, and adsorbent dosage as the most influential variables governing MB removal. Sensitivity analysis further confirmed the significant influence of contact time, temperature, and adsorbent dosage on prediction variability. Two Bayesian optimization strategies were investigated, mathematical optimization, performed over the complete range of the literature‐derived dataset, and engineering‐constrained optimization, performed within practically feasible operating ranges reported in previous adsorption studies, and both cases reported a maximum predicted removal efficiency of 99.99% with varying input variables. Monte Carlo uncertainty analysis indicated a mean predicted efficiency of 75.05% with a 95% confidence interval of 71.85%–79.54%. Residual diagnostics and Bland–Altman analysis demonstrated satisfactory agreement between predicted and observed values within the investigated dataset. Overall, the proposed framework integrates prediction, explainability, uncertainty quantification, and optimization into a unified workflow, providing a promising decision‐support tool for biochar‐based wastewater treatment.

More from our Archive