## 2 Materials and Methods
### Convolutional Neural Network (CNN)  
CNN is one type of DNN that uses the convolutional principle in its data processing. The basic concept of CNN architecture is to utilize a convolutional layer to detect the relationship between the features of objects and a pooling layer to similar group features. The CNN architecture consists of a series of layers, namely the Convolutional Layer (CL), which functions to transform a set of activations with a differential function, a Pooling Layer, and the final result is a Fully Connected Layer (FCL). Unlike other neural networks where all neurons are fully connected with every other neuron of the next layer, CNN disregards zero-valued parameters and makes fewer connections between layers. The non-zero parameters can be shared to be used by more than one connection in the layer to reduce the number of connections. This characteristic is useful for recognizing features.  
The pooling layer function is used to reduce the size of an image by downsampling it and summarizing the features. The common pooling methods to achieve grouping are average pooling, where the summary is the dominant feature, and maximum pooling by summarizing the strongest feature [53]. Average pooling produces a smooth feature that is useful to extract the most relevant value, such as the color of a surface, where a small variation in isolated points within a region does not affect the overall value. On the other hand, max-pooling extracts high contrast data, such as edges or points.  
The problem with a sampling matrix (and an image) in CL is that pixels at and near the edge are sampled less than pixels farther from the edge. This sometimes results in sampling inaccuracy. To prevent this, the kernel filter is padded, with extra rows and columns to allow for more information to be collected from the edge pixels. For two-dimensional data, there are two types of padding: same padding and valid padding. Same padding maintains the sample size at the same as the original matrix; basically, it resamples the image. Valid padding considers all pixels valid, so the model considers the value. This is useful for keeping the information from corner pixels since the simple model considers it invalid due to being less sampled compared to other pixels.  
The extracted features compose the feature map that the FCL will use to classify the result. This approach makes CNN a method with fewer computational requirements than the fully connected ANN structure. The CL calculation is formulated in Equation (4):  
\[h_{i,j}=\underset{k=1}{\sum}\underset{l=1}{\sum}w_{(k,l)}x_{(i+k-1),(j+l-1)} \tag{4}\]  
and the pooling layer (max pooling) is stated in Equation (5):  
\[h_{i,j}=max\Big{\{}x_{(i+k-1),(j+l-1)}\forall l\leq k\;and\;1\leq l\leq m\Big{\}} \tag{5}\]  
with fully connected layer \(h\) formulated in Equation (6):  
\[h=\underset{i}{\sum}w_{i}x_{i} \tag{6}\]  
where \(h_{i,j}\) is the output at point \((i,j)\) on the layer with input \(x\) and filter \(w\), and \(m\) denotes the width and height of the filter. Non-linear functions are used in CL and FCL to convert negative values to zero, including Sigmoid, Hyperbolic Tangent (_Tanh_), and Rectified Linear Unit (ReLU).  
Three-dimensional CNN is a CNN structure whose input is a set of square matrices, s \(\times\) (\(n\times m\)), so it is a suitable method for image segmentation and classification. In this study, the dataset used is multi-sensor, multi-temporal data derived from SAR and optical images, rainfall data, and ground surface contour data, as shown in Figure 7.