# Application of Machine Learning Models in Optimizing Wastewater Treatment Processes: A Review
## 2 Wastewater Treatment Processes in an Industrial Wastewater Treatment Plant
### Performance Indicators Used in Wastewater Treatment  
As mentioned before, AI models, ML, and ANNs are efficiently predicting the WWTP effluent quality (for instance, making accurate predictions for COD and BOD parameters) and are optimizing the plant treatment processes because they can handle the complex and high nonlinear relationships between processes' key features [39; 56; 57]. An example in this sense is presented in [PERSON] et al. [56], where a type of ANN model named shallow neural network (SNN) and a type of ML model, namely Random Forest (RF), supplied high modelling accuracy (for certain pollutants, the correlation coefficient reaching up to 96%). An SNN can be identified by its architecture (which usually contains an input layer, one or two hidden layers, each hidden layer having between 10 and 100 neurons, and one output layer), its reduced training time (minutes to hours), and its higher interpretability (it can trace connections). It is a well-known fact that ML and DL models usually require a large amount of high-quality data for training, testing, and validation purposes, this being a problem that every researcher faces in their research work due to financial limitations and data collection and management constraints [5]. In this domain of wastewater treatment processes, it is very difficult to access a large amount of data from a WWTP, so the performance of some DL models, like CNNs and Recurrent Neural Networks (RNNs), using insufficient datasets is characterized by low accuracy and performance [58]. For assessing AI-based systems in wastewater treatment process optimization (operational efficiency and environmental impact), key performance indicators (KPIs) that encompass a range of statistical metrics are used. A key KPI for AI models is their predictive accuracy, which is measured using a set of statistical metrics, including mean square error (MSE), correlation coefficient (r), and root mean square error (RMSE). In [PERSON] and [PERSON], [PERSON] et al., and [PERSON] et al. [12; 39; 56], these statistical metrics are applied to measure how well the AI models can predict the quality parameters (COD and BOD5) of a plant effluent. Another important KPI is the AI-based systems' ability to minimize a WWTP's energy consumption and the required chemical reactants, with significant benefits in terms of reduced costs and improved environmental protection. In [PERSON] and [PERSON] [37], the economic and environmental benefits of using AI-based systems for optimizing wastewater treatment processes were demonstrated, as their use resulted in a decrease in plant energy consumption of up to 15% and a reduction in the necessary chemical reactants of up to 14%. In addition, another important KPI is the implementation of predictive maintenance strategies in the WWTP to predict plant equipment failures (the downtime was reduced by 18%) and to extend the lifespan of the plant infrastructure through the analysis of historical data sensors to anticipate potential equipment malfunctions (the maintenance costs were reduced by 10%) [34; 51]. In this sense, [PERSON] et al. [21] present the integration of predictive maintenance services with digital twin platforms for forecasting the status of water dosage pump motors, thereby preventing process shutdowns and the accidental discharge of untreated wastewater into the plant effluent through timely interventions. The implementation of AI-powered predictive maintenance in a WWTP yields significant cost savings (by preventing sudden failures of plant equipment, facilitating more efficient planning of maintenance tasks, and optimizing resource reuse, among other benefits) and notable environmental benefits [51; 59]. As demonstrated through a pilot study at an industrial WWTP, all of these benefits lead to a reduction in the plant's annual total operation cost of up to 12% [51]. Another KPI is that AI can improve wastewater treatment sustainability (through resource recovery), and it can reduce the impact of a WWTP's greenhouse gas emissions on the environment.