# Hybrid Modeling for Stream Flow Estimation: Integrating Machine Learning and Federated Learning
## 4 Statistical Results
### Machine Learning Applications Results
Figure 12 illustrates the performance comparison of the machine learning models with the WT applied to the Melekbahce dataset for both training and test results. The x-axis represents the different machine learning models used in the study, including LR, SVR, DT, RF, and ETR. The y-axis represents the coefficient of determination (r\({}^{2}\)) values, which indicate how well each model fits the data and explains the variance in flow rate predictions. The blue bars represent the r\({}^{2}\)_train values, which measure the goodness of fit for the training dataset. Higher r\({}^{2}\)_train values signify better performance in capturing the relationships and patterns in the training data. The orange bars correspond to the r\({}^{2}\)_test values, which assess the models' ability to generalize and predict flow rates accurately on unseen test data. Higher r\({}^{2}\)_test values indicate that the models can effectively generalize to new instances and make accurate predictions. Table 8 presents a comprehensive comparison of the method results data for both the Besdegirmen and Melekbahce datasets. The table includes the methods used, the stations for which they were applied, the method inputs (features), the best performing method for each station, the MSE values, and the coefficient of determination (R\({}^{2}\)) percentages. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **r\({}^{2}\)\_train \%** & **r\({}^{2}\)\_test \%** & **d\_train** & **d\_test** & **rmse\_train** & **rmse\_test** \\ \hline LR & 53 & 53.1 & 3892.4 & 4028.3 & 5467.9 & 5661.3 \\ SVR & 84.9 & 79.7 & 1742.7 & 2072.4 & 3093.6 & 3720.6 \\ DT & 98.4 & 72.5 & 520.6 & 2533.7 & 1025.4 & 4329.5 \\ RF & 97.8 & 85.2 & 673.2 & 1871 & 1169.3 & 3176.6 \\ ETR & 98.5 & 84.8 & 505.3 & 1891.2 & 1016.7 & 3217.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison of wavelet transform Melekbahce training and test results. Figure 12: Wavelet transform Melekbahce training and test results. For the Besdegirmen station, five different methods, namely LR, SVR, DT, RF, and ETR, were applied using the average flow rate (Favg), total precipitation (Psum), and average air temperature (Tavg) as input features. Among these methods, the ETR achieved the best performance, with an MSE of 220.7 mm\({}^{2}\) and an R\({}^{2}\) of 88%. Similarly, for the Melekbahce station, the same methods were used with the average air temperature (Aavg), total precipitation (Ysum), and average stream flow (Savg) as input features [30]. In this case, RF was found to be the best performing method, with an MSE of 4456.7 mm\({}^{2}\) and an R\({}^{2}\) of 70.9%. The table also presents results for the wavelet-transformed data, denoted as W-LR-SVR-DT-RF-ETR, for both stations. For Besdegirmen, the wavelet-transformed average air temperature (Aavg), total precipitation (Ysum), and average stream flow (Savg) were used, and the best performing method was the WT-ETR, with an impressive MSE of 96.3 mm\({}^{2}\) and an R\({}^{2}\) of 97.7%. Similarly, for Melekbahce, the wavelet-transformed average air temperature (Aavg), total precipitation (Ysum), and average stream flow (Savg) were used, and the best method was the WT-RF, with an MSE of 3176.6 mm\({}^{2}\) and an R\({}^{2}\) of 85.2%. These findings highlight the effectiveness of the wavelet transform in improving the predictive performance of the machine learning models for both stations.