# Hybrid Modeling for Stream Flow Estimation: Integrating Machine Learning and Federated Learning
## 3 Material and Experimental Methods
### Wavelet Transform  
WT is a powerful signal analysis tool widely used to observe and analyze signals in the time-frequency domain. This method allows the examination of non-consecutive and stationary signals by decomposing time series data into its subcomponents and analyzing dominant repetitions and their changes over time [71]. In our study, the original data comprised average river flow rate, total precipitation, and average temperature. To enhance the accuracy of river flow estimation, we applied wavelet conversion analysis, which subdivided and transformed the data. Notably, the hybrid method developed using WT demonstrated a significant improvement in river flow estimation. The research article primarily focused on machine learning practices for predicting stream flow data, utilizing daily average flow data from two stream gauging stations in Turkey, along with daily average temperature and total precipitation data. We employed five different machine learning algorithms and compared their results. Remarkably, the RF and ETR models outperformed the others in predicting flow rates. To further enhance the machine learning models' performance, we adopted the WT, which resulted in even better outcomes. Among several wavelet filters considered, including Mexican Hat, Daubechies, Biorthogonal, Symlets, Haar, Coiflets, Morlet, and Meyer, we selected the Daubechies (db10) wavelet family. Each step of the wavelet conversion involved applying the wavelet function to the input data. We calculated wave function values and scaling function values through ten replicates to obtain recurring values used to refine the computational results [72]. The utilization of the WT, particularly the Daubechies wavelet family, significantly contributed to the research's success in achieving higher accuracy in predicting river flow rates. This approach proves valuable for enhancing the performance of machine learning models in similar hydrological analyses, providing researchers and practitioners with a powerful tool to make more informed decisions in water resource management and environmental monitoring. The results presented in this study emphasize the significant influence of implementing WT in enhancing the accuracy of river flow forecasts. The extent of this augmentation becomes more evident when the capabilities of machine learning algorithms are effectively combined. The Daubechies wavelet family is a well-suited choice in this complex combination, effectively managing the crucial need for time-frequency resolution, necessary for precise forecasts. Utilizing ten iterations of computations for both wave function values and scaling function values enhances the precision achievable in the obtained findings. Remarkably, this novel methodology has the potential in the domain of river flow forecasts and other hydrological contexts, including flood forecasting and the critical field of drought monitoring. The adaptability of this strategy reflects its strength beyond its limited usefulness. In addition to its applications in hydrology, this approach has the potential to impact several fields significantly, such as health and finance, which are characterized by complex systems and dynamics. Both domains need a detailed analysis of signals that change over time. The WT method can effectively identify complex temporal patterns, making it a crucial instrument in decoding medical diagnoses that unfold over time and shedding light on the subtle changes that influence financial markets. Therefore, the importance of this study extends beyond its immediate results, influencing a wide range of scientific and practical applications. The recognition of the symbiotic relationship between Wavelet Transform (WT) and machine learning as a cutting-edge force in enhancing prediction accuracy is evidence of the ongoing significance of multidisciplinary collaboration.