## 3 Data Implementation
### Artificial Neural Networks  
The ANN is a widely used model, inspired by how the human brain processes and computes information in order to perform a specific task or function, and with a structure of information capable of performing tasks such as classification, pattern recognition and knowledge \"acquired from its environment through a learning process\" and stored in synapses [26; 29]. A multilayered perceptron (MLP) is a type of neural network shown in Figure 3 and made of at least three layers: an input layer, one or more hidden layers, and an output layer. The input signal goes through the network in a forward direction, on a layer-by-layer basis.  
The output \(y\) of neuron \(k\) is given by  
\[y_{k}=\varphi(u_{k}+b_{k})\quad\text{and}\quad u_{k}=\sum_{j=0}^{m}w_{kj}x_{j} \tag{2}\]  
Figure 3: Architectural graph of a MLP with four layers, of which two are hidden between the input and output layers.  
Figure 2: Structure of a random forest with \(N\) trees.  
where \(w_{kj}\) is the synaptic weight from input \(x_{j}\) to \(k\), and \(b_{k}\) is the bias that influences the input of the activation function \(\varphi\). The computational power of a multilayer perceptron is due to hidden neurons, with significant connectivity between them through their synapses, facilitating pattern recognition in the network, a crucial component in solving complex problems [29].  
Weights and biases can be trained by iterative algorithms, based on an error function, which for the \(n\)-the iteration on neuron \(i\) is defined as  
\[e_{i}(n)=d_{i}(n)-y_{i}(n) \tag{3}\]  
where \(d\) is the desired output and \(y\) is the neuron's output. This error function can be further developed for an output layer of size \(O\) as an error energy function:  
\[E_{avg}=\frac{1}{N}\sum_{n=1}^{N}E(n)\quad\text{where}\quad E(n)=\frac{1}{2} \sum_{i=1}^{O}e_{i}^{2}(n) \tag{4}\]  
\(N\) is the size of the data set. During optimization, the error energy function propagates, layer by layer, in a backward course through the network, the overall objective being to minimize it as much as possible [29]. The backpropagation (BP) algorithm represents mathematically how a neural network learns as model of supervised learning, with the propagation of errors in the opposite direction of the output layer, and corrections are made in synaptic weights with the delta rule. The delta rule for the output layer is computed:  
\[\Delta w_{ij}=\eta\;\delta_{i}y_{j} \tag{5}\]  
where \(\eta\) is the learning rate and \(\delta_{i}\) is the local gradient, indicating where changes need to happen in the synaptic weight. For a hidden layer, the local gradient has to adapt the corrections made for its synaptic weights and the ones made by the earlier layer. The correction of the synaptic weights is a recursive computation, given by  
\[w_{ij}^{*}=w_{ij}+\Delta w_{ij} \tag{6}\]  
where \(w_{ij}^{*}\) is the corrected weight, proportional to a partial derivative responsible for the direction search of the synaptic weight \(w_{ij}\)[29]. Because the average error function is a parabolic type of function where the curve opens upwards, depending on the result of the variation of error, the synaptic weights can increase or decrease in order to minimize the error function [26]. If the partial derivative has a positive slope, the correction made is leftwards, meaning that \(w_{ij}^{*}\) will decrease in absolute value, whereas if the partial derivative has a negative slope, the correction made is rightwards, with an increase for the synaptic weight. The rate of how these corrections are made is what defines the neural network's learning rate, where it sets the pace. If the learning rate is higher, the pace of correction is higher, which might lead to oscillatory and unstable behavior of the synaptic weights [29].