## 2 Materials and Methods
### Data Description and Analysis  
This study focuses on modeling the characteristics of incoming wastewater based on a single time series (BOD\({}_{5}\) values, mgO\({}_{2}\)/L). This research was conducted over a period of 24 months, during which BOD\({}_{5}\) measurements were taken every two days, resulting in a total of 327 analytical results. Figure 2 illustrates the graphs depicting the distribution of these values.  
The distribution of the values is normal, as confirmed by the Shapiro-Wilk test. There are no long tails present, and the values fall within the ranges established by the experimental program. The collected data contain a small number of outliers that fall beyond 1.5 times the interquartile range (IQR). These outliers correspond to peak substrate concentrations and are not considered anomalous. Therefore, no data correction is necessary. Figure 3 displays the time series of the obtained data.  
Figure 4 illustrates the values of BOD\({}_{5}\) after resampling. The resampling was conducted using the weekly average, which facilitates the interpretation of the timeline.  
Figure 5 presents the trend and seasonal component graphs for the studied timeline. It is evident that the values exhibit a pronounced trend and seasonal component, which will be utilized during the training of the neural network. The upward trend indicates an increase in BOD\({}_{5}\) concentration, which is associated with the implementation of water-saving technologies in the region under study. The seasonality of pollutant concentrations is attributed to the dilution of wastewater due to groundwater infiltration in the sewage systems. Additionally, the summer months in the region are characterized by low precipitation, which further impacts wastewater concentrations, particularly due to the inflow of stormwater into the municipal severe system.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Parameter** & **Max.** & **Min.** & **Mean** \\ \hline BOD\({}_{5}\), mgO\({}_{2}\)/L & 158 & 80 & 115 \\ NH\({}_{4}\)-N, mg/L & 81.8 & 18.5 & 37 \\ PO\({}_{4}\)-P, mg/L & 13.5 & 2.8 & 7.2 \\ TSS, mg/L & 194.15 & 89.88 & 115.36 \\ pH & 8.7 & 7.3 & 7.7 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Concentrations of synthetic wastewater.  
Figure 2: Histogram of BOD\({}_{5}\) distribution in the influent.  
Figure 6 presents the Autocorrelation Function (ACF) plot for the non-resampled data. Based on the area of statistical significance, lag values exhibiting positive correlation and identified as statistically significant can be observed up to 20 lags. These lags were used as predictors in the modeling process. Additionally, the variable \"month\" was included as a predictor due to the evident correlation between the month of observation and the average value of the indicator. Furthermore, a \"rolling\" average was introduced, representing the moving average (the mean BOD\({}_{5}\) value over the most recent measurements, in this case, three measurements).  
Figure 4: BOD\({}_{5}\) values by days of the experiment (after resampling by week).  
Figure 5: _Cont_.  
Figure 3: BOD\({}_{5}\) values by days of the experiment.  
Thus, the dataset for modeling comprised 22 predictors, one target variable, and 327 data rows. The training set constituted 80% of the total data, while the test set accounted for 20%. The data were provided to these models without shuffling.