Machine Learning Classification of Effluent Quality in Wastewater Treatment
摘要
Efficient wastewater treatment is crucial for protecting both public health and the environment. Traditional monitoring of wastewater treatment plants (WWTPs) often involves considerable amounts of time and resources. This work evaluates machine learning algorithms to predict effluent quality categories based on biological oxygen demand (BOD) values using parameters that could be measured with low-cost sensors such as suspended solids (SS), pH and electrical conductivity (EC). Four algorithms were tested: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Random Forest (RF) and XGBoost (XGB), to classify effluent quality into two categories: ‘Green’ (BOD < 22 mg/L) or ‘Red’ (BOD ≥ 22 mg/L). Permutation importance analysis identified SS as the most influential variable. Models using only SS as input maintained comparable performance. To address class imbalance, the Synthetic Minority Oversampling Technique (SMOTE) was applied, which led to improved recall values and better identification of ‘Red’ cases (KNN: 0.78, SVC: 0.88, RF: 0.76, XGB: 0.80). The proposed models can be integrated into a real-time monitoring system with SS sensors, which could allow early detection of treatment issues. Prediction capabilities can be further enhanced by using a dataset with a more balanced distribution and refined classification categories, such as green, yellow, and red.