## 3 Results and Discussion  
The modeling results demonstrated the capability to achieve stable predictions of BOD\({}_{5}\) values up to 5 days in advance using all the examined models. This forecasting enabled proactive adjustments to the volume of recycled return-activated sludge, thereby regulating the Mixed Liquor Suspended Solids (MLSS) and, consequently, the specific load of organic pollutants. Additionally, adjustments were made to the aeration scheme of the facility and the duration of the treatment process. Direct measurement of BOD\({}_{5}\) using conventional methods within a timeframe shorter than 5 days is impractical; therefore, this forecast holds significant practical value for the operation of wastewater treatment plants. The performance metrics of these models based on the test data are summarized in Table 2.  
The performance of these models was consistent. The identified prediction errors were significantly lower than the actual error of the analytical method for determining BOD5, which has a relative error of 9% in the concentration range of 100 to 300 mg/L. The best results were achieved by the ARIMA-LSTM architecture, which effectively accounted for various types of dependencies. Notably, the LSTM model alone also demonstrated high performance and could be used without the ARIMA component, reducing resource consumption. The literature supports the effectiveness of LSTM modeling for predicting values in time series related to the quality of incoming wastewater [19; 20; 30; 44]. The magnitude of the error depends on the characteristics of the time series itself and the presence of necessary correlation dependencies. To improve modeling quality using the MAGRU architecture, it is essential to identify the most significant additional predictors for inclusion in this model. In this study, the \"month\" characteristic was used, indicating an overall trend of increasing or decreasing concentrations of the target variable. Additional predictors are described in works [12; 28; 45; 46] and should be integrated into the monitoring system at the stage of time series formation. Additionally, the ensemble models CatBoost and XGBoost also demonstrated high accuracy. Their metrics were nearly identical, which can be attributed to the dataset being equally well-suited for both models. This is supported by recent studies that examined the results of these models in time series tasks related to wastewater characteristics [47; 48; 49]. At \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Model** & **MSE** & **MAE** & **SMAPE** & **R2** \\ \hline LSTM & 2.860 & 1.332 & 1.183 & 0.987 \\ ARIMA–LSTM & 2.754 & 1.224 & 1.052 & 0.991 \\ MAGRU & 2.799 & 1.289 & 1.091 & 0.986 \\ Prophet & 3.005 & 1.417 & 1.288 & 0.918 \\ CatBoost & 3.011 & 1.421 & 1.301 & 0.897 \\ XGBoost & 3.028 & 1.435 & 1.312 & 0.891 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Metrics for Evaluating Models Performance. the same time, the Prophet model showed weaker results compared to more specialized models. However, its performance can still be considered acceptable within the scope of the studied task. Prophet's ability to handle time series with simple seasonality makes it a useful tool for preliminary data analysis [50]. All models under consideration--LSTM, ARIMA-LSTM, MAGRU, Prophet, CatBoost, and XGBoost--incorporated the additional predictor, \"month\", allowing them to capture temporal patterns associated with monthly variations. Notably, if a pure ARIMA model had also been considered, it would not have been able to accommodate this additional predictor due to its inherent limitations in handling multiple input features. By including \"month\" as a predictor, we aimed to represent the seasonal and trend-related aspects that arise over the course of a year. This encompasses not only the cyclical changes in wastewater inflow and concentrations but also the gradual upward trend in key parameters.