# Detection of Forest Windstorm Damages with Multitemporal SAR Data--A Case Study: Finland
## 3 Methods
### ik-NN Method in Storm Damage Recognition  
The well-known k-NN estimation method was tailored for and employed in storm damage recognition. The weights for the features were calculated with a genetic algorithm [36; 47] and its variant for categorical variables [48]. This k-NN method is called the ik-NN method (improved k-NN) here. The advantage of the ik-NN method is the weighting of the explanatory variables based on their importance in prediction and thus smaller prediction errors compared to the ordinary k-NN method, wherefore it is called improved. Other advantages of the k-NN method are that all variables can be estimated simultaneously. It preserves thus the natural dependencies of the variables in the estimates, e.g., among stand age, mean height, mean diameter of the trees and the volume of the growing stock. It is non-parametric, and no model is needed. When the weights for training observations are collected for the calculation units, it also avoids a tendency towards the mean in the areal level estimates that is typical for many other methods (see, e.g., [36]). The k-NN estimation method became popular in forest applications when it was taken into into the operational Finnish multi-source forest inventory (e.g., [49; 50]). It is very well suited for calculation of the areal level estimates. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**W** & **lin\({}_{1,2,3}\) col\({}_{1,  
Let us recall the main features of the ik-NN estimation with the genetic algorithm in the feature weighting. Denote the \(k\) nearest feasible stands by \(i_{1}(p),\ldots,i_{k}(p)\) when the distance is calculated in the feature space. The weight \(w_{i,p}\) of stand \(i\) to stand \(p\) is defined as  
\[w_{i,p} = \tag{4}\] \[= 0\quad\text{otherwise}.\]  
The value of \(k\) was fixed to be 5 after preliminary tests using the overall accuracy as the criterion. The distance weighting power \(t\) is a real number, usually \(t\in[0,2]\). The value \(t\)=1 was used here. A small quantity, greater than zero, is added to \(d\) when \(d=0\) and \(i\in\{i_{1}(p),\ldots,i_{k}(p)\}\). The distance metric \(d\) employed was  
\[d_{p_{j},p}^{2}=\sum_{l=1}^{n_{f}}\omega_{l}{}^{2}(f_{l,p_{j}}-f_{l,p})^{2}, \tag{5}\]  
where \(f_{l,p}\) is the \(l\)th SAR feature variable of stand \(p\), \(f_{l,p_{j}}\) is the \(l\)th SAR feature variable of the nearest neighbor \(j\) of stand \(p\), \(n_{f}\) the number of SAR feature variables and \(\omega_{l}\) the weight for the \(l\)th SAR feature variable. The values of the elements \(\omega_{l}\) of the weight vector \(\mathbf{\omega}\) were selected with a genetic algorithm. The details of the genetic algorithm employed are given in [47] and the modification to categorical variables in [48]. The fitness function for the categorical variables to be minimized with respect to \(\mathbf{\omega}\) vector was  
\[f[\mathbf{\omega},\mathbf{\gamma},B(\mathbf{X})=\sum_{j=1}^{n_{m}}\gamma_{j}[1-B_{j}(\mathbf{ X}_{j})], \tag{6}\]  
where \(\gamma_{j}>0\) is a user defined coefficient, \(\mathbf{X}_{j}\) an error matrix, \(B_{j}\) is the accuracy measure with response variable \(j\) whose classes are to be predicted, \(n_{m}\) is the number of response variables to be considered in the optimization procedure and \(\mathbf{\omega}\) is the weight vector to be optimized (Equation (5)). The number generations in the genetic algorithm optimization was selected to be 40 after the tests. For categorical variables, the mode or median of the predicted classes for the nearest neighbors can be used as a prediction instead of a weighted average as is used for continuous variables. For this study, the mode gave more accurate results than the median, consistent with the earlier investigations [48]. The predicted category is the category that has the greatest sum of the weights, \(\omega_{i,p}\), when summed up by classes over the k nearest neighbors. In theory, equal sums are very rare when real value weights are used; in fact, the probability is zero if rounding is not considered.