Flash Flood Water Depth Estimation Using SAR Images, Digital Elevation Models, and Machine Learning Algorithms

In this article, the local spatial correlation of multiple remote sensing datasets, such as those from Sentinel-1, Sentinel-2, and digital surface models (DSMs), are linked to machine learning (ML) regression algorithms for flash floodwater depth retrieval. Edge detection filters are applied to remote sensing images to extract features that are used as independent features by ML algorithms to estimate flood depths. Data of dependent variables were obtained from the Hydrologic Engineering Center’s River Analysis System (HEC-RAS 2D) simulation model, as applied to the New Cairo, Egypt, post-flash flood event from 24–26 April 2018. Gradient boosting regression (GBR), random forest regression (RFR), linear regression (LR), extreme gradient boosting regression (XGBR), multilayer perceptron neural network regression (MLPR), k-nearest neighbors regression (KNR), and support vector regression (SVR) were used to estimate floodwater depths; their outputs were compared and evaluated for accuracy using the root-mean-square error (RMSE). The RMSE accuracy for all ML algorithms was 0.18–0.22 m for depths less than 1 m (96% of all test data), indicating that ML models are relatively portable and capable of computing floodwater depths using remote sensing data as an input.


Introduction
Floodwater depth identification during or after flash flood events is critical in determining hazard degrees and risk zone maps for the economy and human life [1,2]. Compared with direct surveying methods, measurement techniques, such as side-scan and multibeam sonar, hydrologic modeling, and flow water depth, based on remote sensing are fast, large-scale, and quasi-synchronous with high spatial resolutions. Furthermore, direct surveying methods to determine floodwater depth can be extremely precise, but they are greatly influenced by weather conditions and costly, and surveying field crews are not authorized to reach sensitive flooded areas.
In addition, optical and synthetic aperture radar (SAR) images, and the digital elevation model (DEM) based on airborne light detection and ranging (LiDAR), have been integrated and classified for floodwater surface identification [3,4]. Although SAR data are superior to optical satellite data, as SARs can penetrate cloud cover, they suffer from a long revisit time [5][6][7].
Studies have employed a variety of hydrodynamic 1D, 2D, and 3D software to simulate water levels and floodwater depths, including HEC-RAS, Delft-3D, and LISFLOOD-FP [8,9]. These models require rainfall, soil moisture, flood maps, gauge discharge, cross-sections, and other hydrological inputs to simulate water depth. The disadvantage of employing hydrodynamic models to simulate floodwater depth is the requirement of a large input dataset and extensive computation and calibration.
Recently, the growth of urban regions and infrastructures such as highways and trains has extended the flood-prone regions in New Cairo, Egypt, which has increased the severity of floods [10]. Several studies have mapped flood inundation in New Cairo, but none have addressed floodwater depth. Numerous hydrological characteristics and flood models, such as the Hydraulic Engineering Center's River Analysis System (HEC-RAS), have been applied to map and forecast flood inundation [11][12][13], and machine learning (ML) algorithms have been used to map flood inundation [14][15][16]. No study has attempted to quantify floodwater depth and duration during flood disasters in Egypt so far.
Supervised ML regression algorithms are used to learn a function that combines a set of feature data (independent variables) to predict a dependent variable [17,18]. Random forest regression (RFR) is a kind of ensemble learning [19], i.e., a decision tree supervised ML algorithm based on a set of rules [17].
Furthermore, ML has been used for data extraction, pattern recognition, regression, and classification problems since the start of the 21st century. Research has shown that ML algorithms, such as support vector machine (SVM), RFR, and extreme gradient boosting (XGBR), can efficiently produce spatial predictions [19,20]. RF and XGBR use both decision trees and the bagging technique [21]. Some researchers have trained ML algorithms to estimate water depths using the pixel reflectance values of satellite data, and validated the results through field observation [22].
The current work aims to estimate flash flood water depths by concatenating the spectral information of remote sensing data, such as Sentinel-1 SAR data, digital surface models (DSMs), and land-use maps, at feature levels, and apply a regression algorithm using ML techniques, such as gradient boosting regression (GBR), RFR, linear regression (LR), XGBR, multilayer perceptron neural network regression (MLPR), k-nearest neighbors regression (KNR), and support vector regression (SVR). ML has many properties that make it appropriate for obtaining water depths from remote sensing images. For example, ML algorithms are ideal for processing locally joined data, such as raster data with a spatial grid structure. Moreover, the floodwater levels of unknown locations can be considered the weighted averages of nearby known water depths, as obtained by geographic interpolation. Therefore, I investigate the impact of adjacent pixels of remote sensing data on floodwater depth prediction through ML algorithms. An informative and appropriate number of features should be derived for the subsequent regression ML algorithms. The performance of extracted features and their importance in improving accuracy and accelerating the algorithm are investigated.

Study Area
New Cairo is in the southeast of Egypt's Cairo Province. It was established in 2000, with a land area of approximately 70,000 acres. A 90-square-kilometer area with altitudes ranging from 200 m to 420 m above the mean sea level was chosen to model flash floodwater depths. Figure 1 shows a true-color Sentinel-2 image of the study area, from which a landuse map was created for use in calculating roughness values.

Rainfall Intensity Data
Cairo has a four-season hot desert climate. The study area receives the majority of its rainfall from November through April. Daily rainfall data for the area were obtained from the NASA Prediction of Worldwide Energy Resources (POWER) project, which delivers global weather data with a spatial resolution of 0.5 • . Based on historical meteorological information collected from the POWER website for 1981-2018, the average annual precipitation in the watershed is 51.2 mm/y (https://power.larc.nasa.gov/data-access-viewer/ (accessed on 20 August 2021)). Figure 2 shows the hourly rain intensity during the stormy period, which was used to simulate the water depth of the study area using the HEC-RAS 2D program.

Rainfall Intensity Data
Cairo has a four-season hot desert climate. The study area receives the majority of its rainfall from November through April. Daily rainfall data for the area were obtained from the NASA Prediction of Worldwide Energy Resources (POWER) project, which delivers global weather data with a spatial resolution of 0.5°. Based on historical meteorological information collected from the POWER website for 1981-2018, the average annual precipitation in the watershed is 51.2 mm/y (https://power.larc.nasa.gov/data-access-viewer/) (accessed on 20 August 2021)). Figure 2 shows the hourly rain intensity during the stormy period, which was used to simulate the water depth of the study area using the HEC-RAS 2D program.

Rainfall Intensity Data
Cairo has a four-season hot desert climate. The study area receives the majority of its rainfall from November through April. Daily rainfall data for the area were obtained from the NASA Prediction of Worldwide Energy Resources (POWER) project, which delivers global weather data with a spatial resolution of 0.5°. Based on historical meteorological information collected from the POWER website for 1981-2018, the average annual precipitation in the watershed is 51.2 mm/y (https://power.larc.nasa.gov/data-access-viewer/) (accessed on 20 August 2021)). Figure 2 shows the hourly rain intensity during the stormy period, which was used to simulate the water depth of the study area using the HEC-RAS 2D program.

DSM Data Preparation
A DSM is a raster map representing the above-ground elements. A DEM, without objects such as trees and buildings, shows the shape of the bare earth. Many DSM and DEM data sources, varying from low-to high-resolution, have been produced in the past 30 years [23,24] 10 August 2021)). The region of interest (ROI) was clipped for the study area. Figure 3 shows the DSM with Sentinel-2 true color as the background. objects such as trees and buildings, shows the shape of the bare earth. Many DSM and DEM data sources, varying from low-to high-resolution, have been produced in the past 30 years [23,24]. In particular, the Shuttle Radar Topography Mission (SRTM)-30 m and Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER)-30 m are freely available and can be used for engineering applications, such as flood mapping. Data from the Advanced Land Observing Satellite (ALOS)-30m DSM for the current study area can be downloaded from the ALOS website (https://scihub.copernicus.eu/ (accessed on 10 August 2021)). The region of interest (ROI) was clipped for the study area. Figure 3 shows the DSM with Sentinel-2 true color as the background.

Sentinel-1 Data
SAR penetrates clouds and dense vegetation, which makes it suitable for detecting water areas in all weather conditions. Sentinel-1 data, as a SAR product of the European Copernicus program, are freely accessible through the Copernicus Open Access Hub (https://step.esa.int/main/toolboxes/snap/ (accessed on 15 August 2021)), and cover the globe with a six-day temporal resolution and 10 m spatial resolution. The level-1 Interferometric Wide Swath (IW) product, acquired on 27 April 2018, was used to extract wet areas and estimate water depths during a flash flood in the study area. The Sentinel Application Platform (SNAP) software (https://step.esa.int/main/toolboxes/snap/ (accessed on 1 July 2021)) deals with all Sentinel-1 data products. Fundamental SAR image-processing steps include radiometric calibration, speckle filtering, terrain correction, and sigma naught ( 0 ) value calculation for vertical horizontal (VH) polarization. To improve the visualization of water areas, the pixel values were converted to backscattering in decibels (dB) of 0 . The final SAR image was re-sampled to a 30 m ground sample distance (GSD) by nearest-neighbor interpolation and reprojected into the WGS84/UTM coordinate system.

Sentinel-1 Data
SAR penetrates clouds and dense vegetation, which makes it suitable for detecting water areas in all weather conditions. Sentinel-1 data, as a SAR product of the European Copernicus program, are freely accessible through the Copernicus Open Access Hub (https://step.esa.int/main/toolboxes/snap/ (accessed on 15 August 2021)), and cover the globe with a six-day temporal resolution and 10 m spatial resolution. The level-1 Interferometric Wide Swath (IW) product, acquired on 27 April 2018, was used to extract wet areas and estimate water depths during a flash flood in the study area. The Sentinel Application Platform (SNAP) software (https://step.esa.int/main/toolboxes/snap/ (accessed on 1 July 2021)) deals with all Sentinel-1 data products. Fundamental SAR image-processing steps include radiometric calibration, speckle filtering, terrain correction, and sigma naught (σ 0 ) value calculation for vertical horizontal (VH) polarization. To improve the visualization of water areas, the pixel values were converted to backscattering in decibels (dB) of σ 0 V H . The final SAR image was re-sampled to a 30 m ground sample distance (GSD) by nearest-neighbor interpolation and reprojected into the WGS84/UTM coordinate system.

Land Use
The land-use map was prepared using the ArcGIS 10.4 software by applying the maximum likelihood (ML) supervised classification method for the Sentinel-2 image, which entails four steps: (1) determine the number of layers; (2) select the training sample for each class; (3) estimate the mean vector and covariance matrix for each training sample layer; and (4) classify each pixel in the satellite image based on the covariance matrix and mean vector. Figure 4 shows the obtained classification land-use map. Table 1 shows that the overall classification accuracy was 87.1%, with a kappa coefficient of 0.815. The kappa coefficient indicates how well the classification results and truth values agree. A kappa value of 1 indicates complete agreement, whereas a value of 0 indicates no agreement. entails four steps: (1) determine the number of layers; (2) select the training sample for each class; (3) estimate the mean vector and covariance matrix for each training sample layer; and (4) classify each pixel in the satellite image based on the covariance matrix and mean vector. Figure 4 shows the obtained classification land-use map. Table 1 shows that the overall classification accuracy was 87.1%, with a kappa coefficient of 0.815. The kappa coefficient indicates how well the classification results and truth values agree. A kappa value of 1 indicates complete agreement, whereas a value of 0 indicates no agreement.

Water Depth Extraction (Dependent Variable)
There were no direct measurements of water depth during flood times, so the DSM, land-use map, and rainfall data were used to analyze the unsteady flow using HEC-RAS 2D version 5.0.6. to estimate the water depth. The water depth from 24-27 April 2018 was

Water Depth Extraction (Dependent Variable)
There were no direct measurements of water depth during flood times, so the DSM, land-use map, and rainfall data were used to analyze the unsteady flow using HEC-RAS 2D version 5.0.6. to estimate the water depth. The water depth from 24-27 April 2018 was generated using the modeling software. The digital map of the modeled maximum floodwater depth over 24-27 April is shown in Figure 5.
Remote Sens. 2022, 14, x FOR PEER REVIEW 6 of 16 generated using the modeling software. The digital map of the modeled maximum floodwater depth over 24-27 April is shown in Figure 5.

Research Methodology
An ML algorithm consists of a dependent variable (Y) and an independent variable (X). In our study, Y represents floodwater depth, and X represents DSM, land-use map, and SAR image information. Water depth values will be predicted from a set of predictors or independent variables. In addition, the water depth and independent data images should match spatially and have the same resolution. The algorithm randomly divides the data into training and test sets before training the model. The ML algorithm updates its input parameters and generates the water depth model throughout the training phase. The model is validated by predicting new water depths using test data and calculating the root mean square error (RMSE) between the predicted and test values. Figure 6 shows a full flowchart for this procedure. I used 80% of the collected elevation data to train the algorithm, and 20% to validate the solutions.

Machine Learning Data Preparation
Any ML predictive modeling project is unique, but there are common basic processes, such as identifying the problem, preparing the data, and assessing and finalizing models [25]. The current project, predicting the depth of floodwater, involves a continuous output quantity rather than a discrete class label. Hence, I used ML regression modeling. Data preparation focuses on converting the gathered raw data to a format that can be used in modeling [26]. I selected appropriate metrics to evaluate the model and optimum hyperparameter tuning as part of the model evaluation. Independent variables (features) are used as the input for ML algorithms. The next two subsections describe how to obtain and manipulate the ML data input.

Research Methodology
An ML algorithm consists of a dependent variable (Y) and an independent variable (X). In our study, Y represents floodwater depth, and X represents DSM, land-use map, and SAR image information. Water depth values will be predicted from a set of predictors or independent variables. In addition, the water depth and independent data images should match spatially and have the same resolution. The algorithm randomly divides the data into training and test sets before training the model. The ML algorithm updates its input parameters and generates the water depth model throughout the training phase. The model is validated by predicting new water depths using test data and calculating the root mean square error (RMSE) between the predicted and test values. Figure 6 shows a full flowchart for this procedure. I used 80% of the collected elevation data to train the algorithm, and 20% to validate the solutions.

Machine Learning Data Preparation
Any ML predictive modeling project is unique, but there are common basic processes, such as identifying the problem, preparing the data, and assessing and finalizing models [25]. The current project, predicting the depth of floodwater, involves a continuous output quantity rather than a discrete class label. Hence, I used ML regression modeling. Data preparation focuses on converting the gathered raw data to a format that can be used in modeling [26]. I selected appropriate metrics to evaluate the model and optimum hyperparameter tuning as part of the model evaluation. Independent variables (features) are used as the input for ML algorithms. The next two subsections describe how to obtain and manipulate the ML data input. Remote Sens. 2022, 14, x FOR PEER REVIEW 7 of 16

Dependent Feature Extraction and Preparation (Y)
During the training and testing of the chosen ML algorithm, the water depth map displayed in Figure 5 (width = 458 and height = 274 pixels) was used as a dependent variable. Before data are used, they must be smoothed by a Gaussian filter to remove noise and outliers [27]. Figure 7 shows a histogram of water depth before and after Gaussian smoothing with σ = 1. Values were then reshaped from 2D (770 × 700) to a 1D Pandas DataFrame [28].

Dependent Feature Extraction and Preparation (Y)
During the training and testing of the chosen ML algorithm, the water depth map displayed in Figure 5 (width = 458 and height = 274 pixels) was used as a dependent variable. Before data are used, they must be smoothed by a Gaussian filter to remove noise and outliers [27]. Figure 7 shows a histogram of water depth before and after Gaussian

Independent Feature Extraction and Preparation (X)
The total number of independent features used to train the ML algorithms was 33, as extracted from SAR images, DSM models, and land-use maps. By applying some edge detection filters to the SAR image in addition to its original pixel values, 30 features were extracted. The earth surface slope and stream order calculated based on a DSM map were added as two more features. The land-use map (Figure 4) was used as another independent feature. Raster images were resized to a raster size of 458 × 274 pixels and a resolution of 30 m before any computations. The total number of sample datasets used after reshaping the 2D raster maps to a 1D vector data form was 125,492.

Independent Feature Extraction Algorithms and Methods
The digital filters and equations used to collect independent variables for input to ML algorithms will be discussed.
Raster SAR images represent pixels with a 30 m ground sample distance, and each pixel has a 0 value for 0 polarization. Gabor kernel values and those from additional edge detection filters, such as Canny, Sobel, Roberts, and Prewitt, were estimated as independent features based on SAR image pixel values. Gabor filters are directional filters used for edge detection and analysis if an image has a sudden sharp increase [29,30], and are determined as where ´= + ´= − + λ is the wavelength, σ is the standard deviation of the Gaussian function in the x and y directions, θ indicates the orientation of the filter, and ψ is the phase offset. The shape of a Gabor filter depends on the aspect ratio γ. If γ is equal to one, then the filter appears as a circle. The shape of the filter will gradually change from an ellipsoid to a straight line when γ is close to zero [31]. By varying the Gabor parameters λ, θ, ψ, σ, and γ, different orientations are used to analyze the texture or obtain features from images. Figure 8 shows the source python code used to extract the Gabor filter parameters using multi for loops. Accordingly, 32 Gabor labels were generated using a Python code, each having the values of its own parameters.

Independent Feature Extraction and Preparation (X)
The total number of independent features used to train the ML algorithms was 33, as extracted from SAR images, DSM models, and land-use maps. By applying some edge detection filters to the SAR image in addition to its original pixel values, 30 features were extracted. The earth surface slope and stream order calculated based on a DSM map were added as two more features. The land-use map (Figure 4) was used as another independent feature. Raster images were resized to a raster size of 458 × 274 pixels and a resolution of 30 m before any computations. The total number of sample datasets used after reshaping the 2D raster maps to a 1D vector data form was 125,492.

Independent Feature Extraction Algorithms and Methods
The digital filters and equations used to collect independent variables for input to ML algorithms will be discussed.
Raster SAR images represent pixels with a 30 m ground sample distance, and each pixel has a σ 0 value for σ 0 V H polarization. Gabor kernel values and those from additional edge detection filters, such as Canny, Sobel, Roberts, and Prewitt, were estimated as independent features based on SAR image pixel values. Gabor filters are directional filters used for edge detection and analysis if an image has a sudden sharp increase [29,30], and are determined as where x = x cosθ + y sinθ and y = −x sinθ + y cosθ λ is the wavelength, σ is the standard deviation of the Gaussian function in the x and y directions, θ indicates the orientation of the filter, and ψ is the phase offset. The shape of a Gabor filter depends on the aspect ratio γ. If γ is equal to one, then the filter appears as a circle. The shape of the filter will gradually change from an ellipsoid to a straight line when γ is close to zero [31]. By varying the Gabor parameters λ, θ, ψ, σ, and γ, different orientations are used to analyze the texture or obtain features from images. Figure 8 shows the source python code used to extract the Gabor filter parameters using multi for loops. Accordingly, 32 Gabor labels were generated using a Python code, each having the values of its own parameters.  The OpenCV open-source code library was used to calculate the values of the Gab features and other edge detection filters [32,33].
The surface slope indicates the steepness of the ground's surface. The slope betwe two points on the Earth's surface can be calculated by dividing their elevation differen by the horizontal distance between them. For the DSM surface, the surface slope in grees can be calculated as where ( , ) is the perpendicular rate of change for the center cell of a moving 3 pixel window for grid-based DSM [34][35][36]. Figure 9 shows The ArcGIS 10.7 software was used to calculate the slope for the current study. hydrology, the stream or waterbody order is a positive, whole number that indicates degree of splitting in a stream channel. Using ArcGIS software version 10.7, a raster ima representing the stream order for the current study site was delineated from the DSM [3 Subsequently, Sentinel-2 remote sensing satellite photos were classified to obtain lan cover features, including water, roads, green areas, buildings, and bare soil, identified integers 1-5, respectively. Figure 10 and Table 2 show the 32 features extracted to tr the ML algorithms and predict water depths. Some features were removed because th output values were constant at a given value and did not vary at each pixel. As a resu the overall number of features dropped from 33 to 32. The OpenCV open-source code library was used to calculate the values of the Gabor features and other edge detection filters [32,33].
The surface slope indicates the steepness of the ground's surface. The slope between two points on the Earth's surface can be calculated by dividing their elevation difference by the horizontal distance between them. For the DSM surface, the surface slope in degrees can be calculated as where dz dx , dz dx is the perpendicular rate of change for the center cell of a moving 3 × 3 pixel window for grid-based DSM [34][35][36]. Figure 9 shows the pixel values of a moving 3 × 3 window, where the neighbors of the center cell e are identified by the letters a to i. The perpendicular rate of change for the x and y directions is calculated as  The OpenCV open-source code library was used to calculate the values of the Gabor features and other edge detection filters [32,33].
The surface slope indicates the steepness of the ground's surface. The slope between two points on the Earth's surface can be calculated by dividing their elevation difference by the horizontal distance between them. For the DSM surface, the surface slope in degrees can be calculated as where ( , ) is the perpendicular rate of change for the center cell of a moving 3 × 3 pixel window for grid-based DSM [34][35][36]. Figure 9 shows The ArcGIS 10.7 software was used to calculate the slope for the current study. In hydrology, the stream or waterbody order is a positive, whole number that indicates the degree of splitting in a stream channel. Using ArcGIS software version 10.7, a raster image representing the stream order for the current study site was delineated from the DSM [37]. Subsequently, Sentinel-2 remote sensing satellite photos were classified to obtain landcover features, including water, roads, green areas, buildings, and bare soil, identified by integers 1-5, respectively. Figure 10 and Table 2 show the 32 features extracted to train the ML algorithms and predict water depths. Some features were removed because their output values were constant at a given value and did not vary at each pixel. As a result, the overall number of features dropped from 33 to 32. The ArcGIS 10.7 software was used to calculate the slope for the current study. In hydrology, the stream or waterbody order is a positive, whole number that indicates the degree of splitting in a stream channel. Using ArcGIS software version 10.7, a raster image representing the stream order for the current study site was delineated from the DSM [37]. Subsequently, Sentinel-2 remote sensing satellite photos were classified to obtain land-cover features, including water, roads, green areas, buildings, and bare soil, identified by integers 1-5, respectively. Figure 10 and Table 2 show the 32 features extracted to train the ML algorithms and predict water depths. Some features were removed because their output values were constant at a given value and did not vary at each pixel. As a result, the overall number of features dropped from 33 to 32. Remote Sens. 2022, 14, x FOR PEER REVIEW 10 of 16 Figure 10. Features used to model water depth.   The collected data were randomly divided into a training dataset (80%, n = 100,393) to generate water depths using various interpolation ML algorithms, and a validation dataset (20%, n = 25,099) to calculate the accuracy of each model.

Quality Assessment
Of the measures for assessing derived ML models, RMSE is commonly used when comparing predicted and actual independent values. The RMSE uses the squared error; hence, greater errors have a stronger influence. The RMSE is calculated as where y i andŷ are the actual and predicted water depths, respectively. The RMSE was used to compare ML models.

Results
Several ML regression techniques, including support vector machine (SVR), random forest (RF), k-nearest neighbors (KNR), and extreme gradient boosting (Xgboost), have been suggested for the spatial interpolation of environmental variables, and several hybrid methods have been adopted.

Machine Learning Hyperparameter Tuning
The precision and accuracy of ML algorithms are determined by the input variables. Hyperparameter tuning is the process of finding the optimal hyperparameters to achieve high precision and accuracy. GridSearch is a function in the Scikit-learn package that is used to find the optimum parameters by building and evaluating multiple models with different hyperparameter combinations. Other parameter tuning methods, such as Random search and Bayesian optimization, can be implemented using Scikit-learn [38]. Figure 11A illustrates the influence of the number of estimators on the RF model's accuracy, which was steady and did not improve after using more than 15 estimators. Figure 11B depicts the impact of using the number of nearby points on the tree model's accuracy. The accuracy of the KNR model was stable and did not improve after employing more than eight neighboring points.

Results
Several ML regression techniques, including support vector machine (SVR), random forest (RF), k-nearest neighbors (KNR), and extreme gradient boosting (Xgboost), have been suggested for the spatial interpolation of environmental variables, and several hybrid methods have been adopted.

Machine Learning Hyperparameter Tuning
The precision and accuracy of ML algorithms are determined by the input variables. Hyperparameter tuning is the process of finding the optimal hyperparameters to achieve high precision and accuracy. GridSearch is a function in the Scikit-learn package that is used to find the optimum parameters by building and evaluating multiple models with different hyperparameter combinations. Other parameter tuning methods, such as Random search and Bayesian optimization, can be implemented using Scikit-learn [38]. Figure  11A illustrates the influence of the number of estimators on the RF model's accuracy, which was steady and did not improve after using more than 15 estimators. Figure 11B depicts the impact of using the number of nearby points on the tree model's accuracy. The accuracy of the KNR model was stable and did not improve after employing more than eight neighboring points. The optimal results can be summarized as follows: the best number of estimators for the RF algorithm was 12; the k-value for KNN was 7; for xgboost, the optimal number of estimators was 60; and for SVR, the kernel was 'C': 1, 'epsilon': 0.02, 'gamma': 0.01, 'kernel': 'rbf'. The C value was used to adjust the error or margin, gamma was used with Gaussian rbf kernel, and epsilon was used to smooth the algorithm response.

Accuracy of Obtained ML Algorithms
When the number of input features is large, it is preferable to use the most significant ones during ML training to reduce processing time, enhance output accuracy, and make model interpretation and understanding easier. Some ML algorithms, such as RFR, assess the effectiveness of their input features [39,40]. Figure 12 shows the degree of importance of each data feature. The optimal results can be summarized as follows: the best number of estimators for the RF algorithm was 12; the k-value for KNN was 7; for xgboost, the optimal number of estimators was 60; and for SVR, the kernel was 'C': 1, 'epsilon': 0.02, 'gamma': 0.01, 'kernel': 'rbf'. The C value was used to adjust the error or margin, gamma was used with Gaussian rbf kernel, and epsilon was used to smooth the algorithm response.

Accuracy of Obtained ML Algorithms
When the number of input features is large, it is preferable to use the most significant ones during ML training to reduce processing time, enhance output accuracy, and make model interpretation and understanding easier. Some ML algorithms, such as RFR, assess the effectiveness of their input features [39,40]. Figure 12 shows the degree of importance of each data feature.

Discussion
As shown by the comparison results, the most effective feature was the surface slope, followed by the SAR backscattering values. Figure 13 shows 30 sample data outputs for the different used algorithms. Although the RMSE is heavily influenced by the distribution of validation points, it is nevertheless a useful metric for assessing the accuracy of predicted water depths. The RMSEs of multiple water depth ranges are shown in Table 3. The GBR and XGBRFR approaches had the best accuracy for the overall test data, and MLPR and KNR had the worst accuracy. The SVR and XGBR algorithms had the most accurate models, with RMSE of 0.20 m at water depths of 0-1 m, contributing to 96% of the test data. Figure 14 shows the RMSE values for all conducted regression algorithms at different water depths.

Discussion
As shown by the comparison results, the most effective feature was the surface slope, followed by the SAR backscattering values. Figure 13 shows 30 sample data outputs for the different used algorithms.

Discussion
As shown by the comparison results, the most effective feature was the surface slope, followed by the SAR backscattering values. Figure 13 shows 30 sample data outputs for the different used algorithms. Although the RMSE is heavily influenced by the distribution of validation points, it is nevertheless a useful metric for assessing the accuracy of predicted water depths. The RMSEs of multiple water depth ranges are shown in Table 3. The GBR and XGBRFR approaches had the best accuracy for the overall test data, and MLPR and KNR had the worst accuracy. The SVR and XGBR algorithms had the most accurate models, with RMSE of 0.20 m at water depths of 0-1 m, contributing to 96% of the test data. Figure 14 shows the RMSE values for all conducted regression algorithms at different water depths. Although the RMSE is heavily influenced by the distribution of validation points, it is nevertheless a useful metric for assessing the accuracy of predicted water depths. The RMSEs of multiple water depth ranges are shown in Table 3. The GBR and XGBRFR approaches had the best accuracy for the overall test data, and MLPR and KNR had the worst accuracy. The SVR and XGBR algorithms had the most accurate models, with RMSE of 0.20 m at water depths of 0-1 m, contributing to 96% of the test data. Figure 14 shows the RMSE values for all conducted regression algorithms at different water depths.    Figure 14 shows the RMSE values for all conducted regression algorithms at different water depths. Previous methods depended on DEM and SAR data and could only be used for flat or gently sloping terrain [41]. The technique I propose is straightforward because it works on any terrain and simply requires SAR and DEM data.

Conclusions
In this study, water depth estimation after a flash flood event in New Cairo City, Egypt, was investigated using multiple ML algorithms. Several training datasets and ML techniques were combined. The backscattering spectral band of the SAR data was used to extract features to be used as independent inputs for ML algorithms. The water depth (dependent input) was extracted by hydrodynamic HEC-RAS 2D software to obtain 250,099 data samples and 33 features to train and validate the used algorithms; 80% of the input data were used for training and 20% for testing. I compared the accuracy of the obtained models. The water depths were classified into five groups, and 96.27% of total water depths fell between 0 and 1 m. All ML methods produced RMSE values of 0.18-0.22 m over this water depth range. The XGBR and SVR models had the best accuracy, and the KNR model had the worst. For deep water depths (more than 6 m), four sample datasets were found. Therefore, the accuracy of all approaches was reduced, as the RMSE values ranged from 7.20 to 6.77 m. Moreover, for all water depths, the prediction results were more consistent, and the GBR and XGBR models achieved the best accuracy. For effective forecasting of water depth from satellite data to build an emergency plan in case of floods,  Figure 14 shows the RMSE values for all conducted regression algorithms at different water depths. Previous methods depended on DEM and SAR data and could only be used for flat or gently sloping terrain [41]. The technique I propose is straightforward because it works on any terrain and simply requires SAR and DEM data.

Conclusions
In this study, water depth estimation after a flash flood event in New Cairo City, Egypt, was investigated using multiple ML algorithms. Several training datasets and ML techniques were combined. The backscattering spectral band of the SAR data was used to extract features to be used as independent inputs for ML algorithms. The water depth (dependent input) was extracted by hydrodynamic HEC-RAS 2D software to obtain 250,099 data samples and 33 features to train and validate the used algorithms; 80% of the input data were used for training and 20% for testing. I compared the accuracy of the obtained models. The water depths were classified into five groups, and 96.27% of total water depths fell between 0 and 1 m. All ML methods produced RMSE values of 0.18-0.22 m over this water depth range. The XGBR and SVR models had the best accuracy, and the KNR model had the worst. For deep water depths (more than 6 m), four sample datasets were found. Therefore, the accuracy of all approaches was reduced, as the RMSE values ranged from 7.20 to 6.77 m. Moreover, for all water depths, the prediction results were more consistent, and the GBR and XGBR models achieved the best accuracy. For effective forecasting of water depth from satellite data to build an emergency plan in case of floods, I recommend integrating various training datasets and machine learning algorithms.

Data Availability Statement:
The data that support the findings of this study are available from the author upon reasonable request.