Remote Sensing of Wetland Flooding at a Sub-Pixel Scale Based on Random Forests and Spatial Attraction Models

: Wetland ﬂooding is signiﬁcant for the ﬂora and fauna of wetlands. High temporal resolution remote sensing images are widely used for the timely mapping of wetland ﬂooding but have a limitation of their relatively low spatial resolutions. In this study, a novel method based on random forests and spatial attraction models (RFSAM) was proposed to improve the accuracy of sub-pixel mapping of wetland ﬂooding (SMWF) using remote sensing images. A random forests-based SMWF algorithm (RM-SMWF) was developed ﬁrstly, and a comprehensive complexity index of a mixed pixel was formulated. Then the RFSAM-SMWF method was developed. Landsat 8 Operational Land Imager (OLI) images of two wetlands of international importance included in the Ramsar List were used to evaluate RFSAM-SMWF against three other SMWF methods, and it consistently achieved more accurate sub-pixel mapping results in terms of visual and quantitative assessments in the two wetlands. The e ﬀ ects of the number of trees in random forests and the complexity threshold on the mapping accuracy of RFSAM-SMWF were also discussed. The results of this study improve the mapping accuracy of wetland ﬂooding from medium-low spatial resolution remote sensing images and therefore beneﬁt the environmental studies of wetlands.


Introduction
Wetlands are among the most diverse and productive ecosystems on the earth, which are created by the impact of prolonged inundation and are characterized by specific soil quality and diverse flora and fauna [1,2]. Wetlands are indispensable for many benefits, including freshwater supply, flood control, groundwater recharge, and climate change mitigation [2]. Wetland flooding is necessary for the flora and fauna of wetlands and is important for the recovery of the wetland biodiversity [1,2].

Principle of SMWF
The intention of SMWF is to obtain the most likely sub-pixel spatial distributions of wetland flooding within a mixed pixel, while maintaining the original proportion of wetland flooding and maximizing spatial dependence. An illustration of SMWF with two classes representing wetland flooding and non-flooding is shown in Figure 1. A fraction image of wetland flooding is shown in Figure 1a, which is the input to SMWF. The fraction value does not specify the distributions of flooding sub-pixels; hence, there could be many possible compositions of flooding and non-flooding sub-pixels. likely distribution of sub-pixels among the three distributions should be Figure 1d. That is because the two 100% flooded pixels nearby give a higher likelihood of flooding by proximity. However, it is usually difficult to find the most likely sub-pixel distributions from numerous possible distributions in the actual SMWF.

SAM-SMWF Algorithm
SAM-SMWF uses SAM to obtain the spatial distributions of wetland flooding at a sub-pixel scale. The rationale of SAM is as follows [35]: (1) SAM is based on the fraction values in neighboring pixels acting towards sub-pixels inside a central mixed pixel.
(2) A sub-pixel can be attracted only by pixels surrounding the central pixel. A maximum of eight neighboring pixels can be considered for attraction.
(3) Other pixels are assumed too distant to exercise the attraction. The flooding attraction value (FAV) and non-flooding attraction value (NAV) for a sub-pixel y p , x are calculated as follows [35]:

SAM-SMWF Algorithm
SAM-SMWF uses SAM to obtain the spatial distributions of wetland flooding at a sub-pixel scale. The rationale of SAM is as follows [35]: (1) SAM is based on the fraction values in neighboring pixels acting towards sub-pixels inside a central mixed pixel.
(2) A sub-pixel can be attracted only by pixels surrounding the central pixel. A maximum of eight neighboring pixels can be considered for attraction.
(3) Other pixels are assumed too distant to exercise the attraction. The flooding attraction value (FAV) and non-flooding attraction value (NAV) for a sub-pixel p x,y are calculated as follows [35]: where N is the number of the neighboring pixels, s is the scale factor, FFV(P(n)) is the flooding fraction value of the pixel P(n), d(p x,y , P(n)) is the distance between a sub-pixel p x,y and a neighboring pixel P(n), i, j are the row and column of the neighboring pixel P(n) relatively to the central pixel, respectively, and x, y are the row and column of the sub-pixel p x,y in the central mixed pixel, respectively. If FAV(p x,y ) ≥ NAV(p x,y ), then the sub-pixel p x,y is classified as wetland flooding. Otherwise the sub-pixel p x,y is classified as non-flooding.

RFSAM-SMWF Algorithm
In this study, we first developed an RF-SMWF method as the basis of RFSAM-SMWF. Random forests are a classifier consisting of a collection of tree-structured classifiers [19,20]. While training, a random third of all training samples are excluded from the training set for each tree, called "out-of-bag". The remaining two-thirds generate a single tree. Each descendant node is split from a parent node for the growth of a tree, using a random subset of the input variables. The "out-of-bag" samples are an independent test set for evaluating the tree internally. To classify a new sample, the input vector of the sample is put down each of the trees in the forest. Each tree gives a classification, and the tree "votes" for that class. The forest chooses the classification which has the most votes over all the trees in the forest. SMWF is a sub-pixel classification issue in essence [5]. In RF-SMWF, a set of random forests is trained to describe the relationship between the fractions of the eight neighboring pixels of a mixed pixel and sub-pixels within the mixed pixel. The number of random forests is equal to the number of sub-pixels in a mixed pixel. The input to the set of random forests is the fractions of the eight neighbors of a mixed pixel. The output of the set of random forests is the classification of sub-pixels of a mixed pixel.
RFSAM-SMWF obtains the spatial distributions of wetland flooding at a sub-pixel scale based on random forests and spatial attraction models. The complexity of mixed pixels is computed based on the comprehensive complexity index (CCI) in RFSAM-SMWF. CCI of a mixed pixel considers the complexity of the mixed pixel itself and the complexity of the neighboring pixels of the mixed pixel. It is formulated as follows: where CI S represents the complexity index of the mixed pixel itself, CI N represents the complexity index of the neighboring pixels of the mixed pixel, N is the number of the neighboring pixels of the mixed pixel, k s is the number of flooding sub-pixels of the mixed pixel, and k n is the number of flooding sub-pixels of the neighboring pixel. The function choose(m, where m is the number of sub-pixels of a mixed pixel. The function int(x) obtains the nearest integer less than or equal to x. If a mixed pixel is in a complex situation according to CCI, RFSAM-SMWF constructs a RF-SMWF model to obtain the sub-pixel distributions of wetland flooding. Otherwise, RFSAM-SMWF obtains the sub-pixel distributions of wetland flooding using SAM. The situation of a mixed pixel is considered as complex if its CCI value is larger than the complexity threshold. Setting the complexity threshold is therefore critical to the performance of RFSAM-SMWF and is discussed in the Discussion section. A flow chart of RFSAM-SMWF is shown in Figure 2.

Study Materials
Two comparative study areas were selected from two representative wetlands designated by the Ramsar Convention as wetlands of global importance [36]. The first wetland is East Dongting Lake Wetland, which is located in Hunan Province, China, and was listed on 31 March 1992. The second wetland is Honghu Wetland, which is located in Hubei Province, China, and was listed on 2 February 2008. The two wetlands experienced significant floods in July 2017 and July 2016, respectively. Corresponding Landsat 8 OLI images were obtained for the two wetlands. Key characteristics of the study areas are summarized and shown in Table 1.

Study Materials
Two comparative study areas were selected from two representative wetlands designated by the Ramsar Convention as wetlands of global importance [36]. The first wetland is East Dongting Lake Wetland, which is located in Hunan Province, China, and was listed on 31 March 1992. The second wetland is Honghu Wetland, which is located in Hubei Province, China, and was listed on 2 February 2008. The two wetlands experienced significant floods in July 2017 and July 2016, respectively. Corresponding Landsat 8 OLI images were obtained for the two wetlands. Key characteristics of the study areas are summarized and shown in Table 1.
Locations of the two study areas are shown in color composite images (R6G3B2) in Figure 3. The flooding reference images were obtained from the corresponding Landsat 8 OLI images using the modified normalized difference water index (mNDWI) [37,38]. The resolution of the flooding reference images was 30 m. The flooding fraction images were obtained by aggregating the corresponding flooding reference images. The scale was set at 5. Therefore, the resolution of the flooding fraction images was 150 m. The value of the aggregated pixel equaled the proportion of flooding pixels inside the corresponding 5 × 5 window. The flooding fraction images were the inputs to the SMWF methods.

Results and Analysis
The four SMWF methods for comparison are SMWF (BP-SMWF) based on a back-propagation neural network [40], SAM-based [35] SMWF (SAM-SMWF), decision tree-based [40] SMWF (DT-SMWF), and RFSAM-SMWF. The four methods were coded in Matlab. RFSAM-SMWF was coded using the TreeBagger function in Matlab, which implements the random forests algorithm with different spatial resolutions acquired at the same time over the study area: a low resolution image from which the flooding fraction image would be derived, and another higher resolution image from which the flooding reference image could be obtained. However, although there are many remote sensing satellites orbiting, it was challenging to find valid images from two different satellite sensors at a close enough time in the specific study area. In that case, areas covered by high spatial resolution satellite data would be the primary option since we could obtain a low spatial resolution flooding fraction image by aggregating a higher resolution flooding reference image, but not vice versa. The scale was set at 5, which was an empirical option that had been proved effective for applying sub-pixel algorithms and had also been adopted by other studies [10,39].

Results and Analysis
The four SMWF methods for comparison are SMWF (BP-SMWF) based on a back-propagation neural network [40], SAM-based [35] SMWF (SAM-SMWF), decision tree-based [40] SMWF (DT-SMWF), and RFSAM-SMWF. The four methods were coded in Matlab. RFSAM-SMWF was coded using the TreeBagger function in Matlab, which implements the random forests algorithm [40]. The number of trees was set at 20 and the complexity threshold was set at 0.1 in RFSAM-SMWF. The same neighboring type of mixed pixels was used for the four methods. Twenty percent of the mixed pixels in the flooding fraction images were randomly selected as training samples for BP-SMWF, DT-SMWF, and RFSAM-SMWF. The hidden layer number was one in BP-SMWF.
Visual comparisons of the four SMWF methods for the two wetlands are shown in Figures 4 and 5. To provide clarity, the same small regions of the reference images and the four SMWF results are zoomed in. As shown in Figure 4, RFSAM-SMWF obtained the best SMWF result for East Dongting Lake Wetland. RFSAM-SMWF integrates SAM with random forests for SMWF and therefore further improves the performance of SMWF. From Figure 5, we can see that RFSAM-SMWF also gave the best visual SMWF result for Honghu Wetland.
The quantitative assessments of the four SMWF methods are shown in Table 2. The results were evaluated based on overall accuracy (OA), Kappa coefficient (KC), average producer's accuracy (APA), and average user's accuracy (AUA) [41,42]. Only mixed pixels in the flooding fraction images were included when calculating the evaluation indices. RFSAM-SMWF obtained the highest evaluation indices for both wetlands. Visual comparisons of the four SMWF methods for the two wetlands are shown in Figure 4 and Figure 5. To provide clarity, the same small regions of the reference images and the four SMWF results are zoomed in. As shown in Figure 4, RFSAM-SMWF obtained the best SMWF result for East Dongting Lake Wetland. RFSAM-SMWF integrates SAM with random forests for SMWF and therefore further improves the performance of SMWF. From Figure 5, we can see that RFSAM-SMWF also gave the best visual SMWF result for Honghu Wetland.

Choosing the Number of Trees in RFSAM-SMWF
The number of trees (NT) is a key parameter of random forests, which affects the classification ability of random forests and therefore affects the sub-pixel mapping accuracy of RFSAM-SMWF. The sub-pixel mapping accuracy of RFSAM-SMWF related to NT was analyzed. The Landsat 8 OLI image for East Dongting Lake Wetland in the case study was used with different NT values. The other parameters of RFSAM-SMWF were the same as those in the case study. The sub-pixel mapping accuracy of RFSAM-SMWF for each NT value is shown in Figure 6. It shows that the higher the NT value, the higher the OA value. The OA value increases from 79.8% to 80.5% when the NT value rises from 10 to 50. The KC, APA, and AUA values have a similar increasing trend as the OA value. That is because random forests are a combination of tree predictors and high NT value increases the classification ability of random forests, which is favorable to increase the accuracy of RFSAM-SMWF. However, we can also see that the values of the evaluation indices have no obvious increase when the value of NT is larger than 40. Therefore, an NT value larger than 40 is unnecessary in this SMWF application.  Figure 6. Sub-pixel mapping accuracy of RFSAM-SMWF related to the number of trees (NT) for East Dongting Lake Wetland, where NT represents the number of trees, OA represents overall accuracy, KC represents Kappa coefficient, APA represents average producer's accuracy, and AUA represents average user's accuracy.

Setting the Complexity Threshold in RFSAM-SMWF
The complexity threshold (CT) determines the number of complex mixed pixels (NCMP) processed by random forests, which affects the sub-pixel mapping accuracy of RFSAM-SMWF. The sub-pixel mapping accuracy of RFSAM-SMWF related to CT was analyzed. The Landsat 8 OLI Figure 6. Sub-pixel mapping accuracy of RFSAM-SMWF related to the number of trees (NT) for East Dongting Lake Wetland, where NT represents the number of trees, OA represents overall accuracy, KC represents Kappa coefficient, APA represents average producer's accuracy, and AUA represents average user's accuracy.

Setting the Complexity Threshold in RFSAM-SMWF
The complexity threshold (CT) determines the number of complex mixed pixels (NCMP) processed by random forests, which affects the sub-pixel mapping accuracy of RFSAM-SMWF. The sub-pixel mapping accuracy of RFSAM-SMWF related to CT was analyzed. The Landsat 8 OLI image for East Dongting Lake Wetland in the case study was used with different CT values. Other parameters of RFSAM-SMWF were the same as those in the case study. Sub-pixel mapping accuracy of RFSAM-SMWF for each CT value is shown in Table 3, where NMP represents the number of mixed pixels in the flooding fraction image and PCMP represents the percentage of complex mixed pixels. It indicates that the higher the CT value, the lower the OA value. The OA value decreases from 80.7% to 76.9% when the CT value rises from 0.05 to 0.50. The KC, APA, and AUA values have a similar decreasing trend as the OA value. That is because a high CT value decreases the number of mixed pixels processed by random forests and increases the number of mixed pixels processed by SAM. Although SAM has several advantages in terms of its simplicity and its explicit physical meanings [8], random forests have a stronger ability to obtain satisfactory SMWF results than SAM in the complex situation. Table 3. Sub-pixel mapping accuracy of RFSAM-SMWF related to the complexity threshold (CT) for East Dongting Lake Wetland, where NCMP represents the number of complex mixed pixels, NMP represents the number of mixed pixels in the flooding fraction image, and PCMP represents the percentage of complex mixed pixels.

Evaluating SMWF Algorithms with Data from a Large Area
One large area located in East Dongting Lake Wetland was selected for further evaluation and analysis of the SMWF algorithms. The materials of the large area (3500 × 2000 pixels) and the mapping results of different methods are shown in Figure 7. The location is shown in a color composite (R6G3B2) Landsat 8 OLI image. The reference image was obtained from the corresponding Landsat image using mNDWI. The parameters of the four SMWF methods are the same as those in the case study. Table 4 shows the performances of BP-SMWF, SAM-SMWF, DT-SMWF, and RFSAM-SMWF in terms of the accuracy obtained from the large area. RFSAM-SMWF obtained the best flooding mapping results among the four SMWF methods in the large area. It exhibited the highest values of OA, Kappa, APA, and AUA. For example, the OA values of BP-SMWF, SAM-SMWF, DT-SMWF, and RFSAM-SMWF are 74.1%, 78.3%, 79.4%, and 82.9%. SMWF is a complex multidimensional issue because there could be many possible sub-pixel distributions in the mixed pixels. Random forests can generate an internal unbiased estimate of the generalization error as the forest building progresses and do not overfit as more trees are added into the forest [20]. Therefore, RFSAM-SMWF can obtain satisfactory results in the complex situation and is suitable for both small and large areas.

Conclusions
Wetland flooding is necessary for the flora and fauna of wetlands and is important for the recovery of the wetland biodiversity. In this study, a novel method called RFSAM-SMWF was proposed to improve the mapping accuracy of wetland flooding at a sub-pixel scale from remote sensing images. The RM-SMWF algorithm was first developed, and the comprehensive complexity index of a mixed pixel was formulated. Then the RFSAM-SMWF algorithm was developed. The RFSAM-SMWF algorithm was evaluated using Landsat 8 OLI images of two wetlands of international importance included in the Ramsar List. RFSAM-SMWF was compared to three other SMWF methods, and it consistently achieved more accurate sub-pixel mapping results in terms of visual and quantitative assessments in the two wetlands. For example, the OA values of BP-SMWF, SAM-SMWF, DT-SMWF, and RFSAM-SMWF are 72.8%, 75.8%, 75.5%, and 80.2% for East Dongting Lake Wetland, respectively. And the OA values of BP-SMWF, SAM-SMWF, DT-SMWF, and RFSAM-SMWF are 70.1%, 73.3%, 70.2%, and 76.7% for Honghu Wetland, respectively. RFSAM-SMWF can obtain satisfactory results in the complex situation and is suitable for both small and large areas. The results of this study improve the mapping accuracy of wetland flooding from medium-low spatial resolution remote sensing images and therefore benefit the environmental studies of wetlands.