## 3 Results
### Feature Selection and Artificial Neural Network Sizing  
Feature selection techniques were applied to the training set, to reduce the number of features and use the most discriminant ones. This process was applied to both median and mean filtered data. The results presented here will be only for the median filter, due to its similarity with the mean filter. The total number of samples used in the ANN training were 633, which accounted for 67% of all the clear observations in the four study areas multiplied by the 13 FBs. According to the SelectKBest feature selection algorithm, the best features in this analysis are: B04, B05, B11, B12, NMDI, NDI, ExG, ExR, ExGR, and MExG. Additionally, the Pearson absolute correlations between these features were calculated, to identify which ones give more information together. Analysing the mean correlation values between a feature and all the others (Table 4), the more independent features are the NMDI and ExG, with 0.751 and 0.748, respectively. The least correlated features pairs were ExG/B05 and ExG/B11, with 0.600 and 0.602, respectively. From this analysis, it was concluded that ExG is probably the most discriminant feature, and consequently it was one of the selected features to be used in the detection. The higher correlated pairs were B11/B12 (0.986) and ExR/ExGR (0.984). In the first pair, the features have a similar behaviour, but B12 has a higher mean correlation, therefore it was rejected. Regarding the other pair, ExR is less correlated to ExG than ExGR, but ExGR works better with B05 and B11 than ExR. The NDI do not enhance the occurrence of a maintenance operation. Finally, B04 is extremely correlated with B05 (0.975), and the same happens with MExG and ExG (0.958). However, with B04 and MExG the same happens as with the NDI. \begin{table}
\begin{tabular}{c  
To access the performance of the classifier for different feature combinations, several groups of features were defined, as presented in Table 5.  
First, all the groups were tested on an ANN with one hidden layer, varying the number of neurons in the interval (5,100) with steps of five. In the cross validation, five folds were used and the process was repeated 10 times, with the mean error being used. The results presented in Figure 13a show that is possible to divide the groups into three sets according to the cross-validation error: the first two tend to a relative error of approximately 6%-8%, while on the third set (group 5, 6, 9, 11) the error can be less than 4%. The best results were verified for the second category, i.e., groups 5, 6, 9 and 11. The recall, precision and F1 score for each class (detection and no detection), also demonstrated a better performance for this third set. Figure 13b shows the recall, used to check the ability to avoid false negatives. Again, groups 5, 6, 9, and 11 were confirmed as better suiting this problem. Although they present similar results, groups 5 and 6 use less features; in these groups NDMI index is not included. If this was used in the data extraction stage, two more bands would be needed (B8A and B12), as well as an extra calculation and two extra neurons in the input layer. This means more processing time, particularly in the data extraction. For these two groups, an ANN with two hidden layers was tested, with the goal of reducing the number of neurons and improve the detection. This test did not show any improvements, so it was defined as an ANN with just one hidden layer. To decide which of these two groups will be used and the final number of neurons, a final test was done varying the number of neurons in the interval (45,60) (where the error is approximately 3%-5%, and the recall and precision are above 90%), with steps of one neuron. Here, both groups have nearly the same error. Since B05 had better results in the feature selection stage, group 5 was chosen. For the ANN structure, one hidden layer with 53 neurons was defined (with an error lower than 3%), with a penalty of 8.