# Application of Image Segmentation in Surface Water Extraction of Freshwater Lakes using Radar Data
## Materials and Methods
### Accuracy Assessment  
We denote a point \(x\) with its true label \(y\) drawn from the true distribution \(\mathcal{D}\) as \((x,y)\sim\mathcal{D}\), where the true distribution \(\mathcal{D}\) is actually unknown. Specifically, \(x\) is the radar dB value for a pixel and defined as:  
\[y= \begin{cases}1&\text{, if the true label of $x$ is Water}\\ 0&\text{, if the true label of $x$ is Non-Water}\end{cases} \]  
Based on the estimation of the optimal threshold \(\hat{\theta}\) from the Otsu Method, we can provide the prediction of the label \(\hat{y}\) for point \(x\) as:  
\[\hat{y}=f_{\hat{\theta}}(x)=\mathbb{1}_{x<\hat{\theta}} \tag{6}\]  
where,  
\[\mathbb{1}_{x<\hat{\theta}}= \begin{cases}1&\text{, if $x<\hat{\theta}$}\\ 0&\text{, otherwise}\end{cases} \]  
Accuracy measures the agreement between a standard assumed to be correct and a classified image of unknown quality [43]. Classification errors occur when a pixel (or feature) belonging to one category is assigned to another category. Errors of omission occur when a feature is left out of the category being evaluated; errors of commission occur when a feature is incorrectly included in the category being evaluated [44]. An error of omission in one category will be counted as an error in commission in another category. Explicitly, for a pixel's dB value \(x\) and its true label \(y\) from the unknown true distribution \(\mathcal{D}\), the error happens when \(\hat{y}\
eq y\). Therefore, accuracy can be mathematically defined as the follow:  
\[Accuracy=\mathbb{E}_{(x,y)\sim\mathcal{D}}\mathbb{1}_{\hat{y}=y} \tag{7}\]  
Since the true distribution \(\mathcal{D}\) is unknown, it is not possible to calculate the accuracy through Equation (7). Therefore, we need an estimator to estimate such accuracy. One possible way to estimate is based on the Empirical Distribution [45]. A test set \(T=\{(x_{i},y_{i})\}_{i=1}^{n}\), which forms an empirical distribution \(\hat{D}\), is used to approximate the true distribution \(\mathcal{D}\), where each element \((x_{i},y_{i})\) is independently and identically (_i.i.d_) drawn from the true distribution \(\mathcal{D}\). \[\{(x_{i},y_{i})\}_{i=1}^{n}\overset{i.i.d}{\sim}\mathcal{D}\]The empirical estimator of accuracy \(\widehat{Accuracy}\) for classification function \(f_{\hat{\theta}}\) can be expressed as:  
\[\widehat{Accuracy}=\frac{1}{n}\cdot\sum_{(x_{i},y_{i})\in T}\mathbb{1}_{\hat{y} _{i}=y_{i}}\quad\text{, where }\hat{y}_{i}=f_{\hat{\theta}}(x_{i}) \tag{8}\]  
Since \((x_{i},y_{i})\in T\), for \(\forall i=1,\ldots,n\), is \(i.i.d\) drawn from the true distribution \(\mathcal{D}\), this estimator \(\widehat{Accuracy}\) in Equation (8) is an unbiased estimator of the true \(Accuracy\) as defined in Equation (7) [46], proved as follows:  
**Proof of Unbias Estimator. **  
\[\mathbb{E}[\widehat{Accuracy}] =\mathbb{E}[\frac{1}{n}\cdot\sum_{(x_{i},y_{i})\in T}\mathbb{1}_ {\hat{y}_{i}=y_{i}}]\] \[=\frac{1}{n}\cdot\sum_{(x_{i},y_{i})\in T}\mathbb{E}[\mathbb{1}_ {\hat{y}_{i}=y_{i}}]\] \[\overset{i.i.d}{=}\frac{1}{n}\cdot\sum_{(x_{i},y_{i})\in T} \mathbb{E}_{(x,y)\sim\mathcal{D}}[\mathbb{1}_{\hat{y}=y}]\] \[=\frac{1}{n}\cdot n\cdot\mathbb{E}_{(x,y)\sim\mathcal{D}}[ \mathbb{1}_{\hat{y}=y}]\] \[=\mathbb{E}_{(x,y)\sim\mathcal{D}}[\mathbb{1}_{\hat{y}=y}]\] \[=\text{Accuracy}\]  
A modified double-blind visual assessment of a random sample of test sites was used to assess classification accuracy. Firstly, a random set of 304 test sites was generated across the region, and the algorithm can be found through the link: source code for random points (by [PERSON]). This random set corresponds to the test set \(T\) with \(n=304\) and each element \((x_{i},y_{i})\) is \(i.i.d\) drawn from the true distribution \(\mathcal{D}\), which is the distribution of dB value and label of the locations in the study area as shown in Figure 1. Next, it was assigned to a team in Nanchang who visited all accessible points from the set of 304.