## 2 Materials and Methods
### Pre-Processing and Processing EO Data
#### 2.4.3 Deep Learning Classification Algorithms  
A convolutional neural network (CNN) usually consists of a sequence of convolution layers and pooling layers, followed by a fully connected layer. The main advantage of CNN to regular neural networks is that the input of CNN models is an image, which allows specific features to be encoded into the model. Those features then help to reduce the number of network parameters [58]. The advantages of the CNN algorithm are  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & Parameter & Distribution & Kernel type \\ \cline{2-5}  & & Range & Gaussian, kernel & Box, Epanechnikov, Gaussian, Triangle \\ \cline{2-5}  & & Tuned & Kernel & Gaussian \\ \hline  & & Parameter & Distance weights & n\_neighbors & Distance metric \\ \cline{2-5}  & & Range & Equal, Inverse, Squared inverse & 1–21 & Euclidean, Minkowski, Spearman, Hamming, Jaccard \\ \cline{2-5}  & & Tuned & Equal & 7 & Euclidean \\ \hline  & & Parameter & NumLearningCycles & Method & MaxNumSplits & MinLeafSize \\ \cline{2-5}  & & Range & 10–500 & Bag, LSBBoost & 1–50 & 1–50 \\ \cline{2-5}  & & Tuned & 100 & LSBBoost & 15 & 10 \\ \hline  & & Parameter & Gamma & C & Kernel type \\ \cline{2-5}  & & Range & 0.001–100 & 0.001–100 & Gaussian, Linear, Quadratic, Cubic, RBF \\ \cline{2-5}  & & Tuned & 10 & 1.27 & RBF \\ \hline \hline \end{tabular}
\end{table}
Table 4: Hyperparameters tuning process for MNB, KNN, SVM, and RF algorithms.  
automatic feature learning, multilayer feature learning, high accuracy, and high generalizability [59; 60]. The CNN method is popular for working with high-dimensional features, performing hierarchical learning operations, and enabling automatic feature extraction. Two kinds of CNNs (1D and 3D) have been used for classification [61].  
One-Dimensional Convolutional Neural Networks (1D-CNN): 1D-CNN uses 1D filters to record the input signal spectral pattern. The implementation of 1D-CNN combines pooling layers, fully-connected layers, and dropout. Convolutional filter widths of 3 and 5 were used. The convolutional layers have 32, 64, and 128 filters, respectively, and the channel number increases when going deeper. Pooling layers were fixed as max-pooling, with a window size of 2. The probability of dropping neurons was set to 10%. This model had one fully connected layer at the output end. The second last layer collected information from previous layers as a flat array, and the size was determined by considering the dimension of the input to the layer. The learning rate was set to 0.001 and the batch size was set to 256. To keep only the positive values, rectified linear unit (ReLU) was used (Figure 4).  
Three-Dimensional Convolutional Neural Networks (3D-CNN): Other than spectral data, 3D-CNN takes advantage of the spatial information (which is not present in other methods) [60], which leads to increasing the computational cost. 3D-CNN executes successive sliding convolution operations in the input feature cube's plane and depth dimensions. Convolutional filter widths of 7, 5, and 3 were used, based on the smallest field of this study's sites. The convolutional layers had 32, 64, and 128 filters, respectively. For 3D-CNN, the network was trained by an initial learning rate of 0.001 for 100 epochs, a 256-batch size, momentum 0.9, learning rate factor 0.01, and Adam optimization. Different spatial window size was used to find an optimum window size. For each pixel, a 4D patch with size \(m\times n\)\(\times\)\(d\times l\), where \(m\times n\) refers to spatial window, \(d\) refers to spectral window, and \(l\) refers to label, were computed and used as input of CNN (Figure 4).