# An ANN Model Trained on Regional Data in the Prediction of Particular Weather Conditions
## Appendix A Fundamentals of Artificial Neural Networks and the Multilayer Perceptron
Then, the resulting value is subjected to the activation function, and the result is the output value of the neuron \(y\) according to the Formula (A3) [88]:  
\[y=w_{0}+\sum_{K}^{k=1}w_{k}\cdot\phi(s_{k}).\] (A3)  
When aggregating inputs using a scalar product, the following functions are most commonly used as activation functions for \(f\): sigmoid (logistic), which is also called an s-shape function because of the characteristic shape of the graph represented by the Formula (A4) and tangensoid (hyperbolic tangent) as defined by the Formula (A5) [74,75,87]:  
\[\phi(s_{k})=\frac{1}{1+e^{-s_{k}}},\] (A4)  
\[\phi(s_{k})=\frac{e^{s_{k}}-e^{-s_{k}}}{e^{s_{k}}+e^{-s_{k}}},\] (A5)  
where \(s_{k}\) is the total stimulation, i.e., a linear combination of the weights and features of a function that can be calculated using the Formula (A6):  
\[z=w^{T}x=w_{0}+w_{1}x_{1}+\ldots+w_{m}x_{m},\] (A6)  
where, by \(k\), we mean any neuron with an index in the range of 1... K, and K means the number of hidden neurons. In this way, the network's response to the signal (pattern) given to its input is known. For each output, we can specify the function \(F\) that generates the network output signals. The set of parameters of the \(F\) function is a set of all network scales (W). For a specific output of \(j\), there is a dependency described by the Formula (A7):  
\[Y_{j}=F_{j}(X,W),\] (A7)  
where X is a vector for the network input signals. The set of W encodes the knowledge about the modeled phenomenon that the network obtains during the learning process [87]. The expected output value is known because it is in the training sequence. It is possible to change the weight in the network in such a way that the value obtained at the output is close to the standard value. Then the error at the neuron output is calculated, which is the difference between the value at its output and the exact value. In this way, the error for the last layer is defined. For the hidden layers, to define the error, we use an algorithm named the backpropagation algorithm [88]. The backpropagation algorithm includes four stages:  
1. Initialization of weights with low random values. 2. Forward propagation (feedforward)--at this stage, each neuron receives and sends a signal to the hidden neurons. Each latent neuron calculates the value of the activation function and sends a signal to the output unit, which calculates the output signal. 3. Backpropagation--after comparing the output values calculated by the network with the exact value, the error is calculated and sent back to all units. 4. Weight adjustment (weight correction) [38]. Modern second-order algorithms, such as the conjugated gradient method and Levenberg-Marquardt method, are faster, which could lead to more frequent use. However,the classic backpropagation method has many important advantages, first of all, it is the simplest algorithm to understand for most users of neural networks, which makes it the most popular with neural network users [74; 75]. The error value depends on the weights of the network W, and thus appropriate modification of the weights during the learning process leads to its reduction by striving to minimize the cumulative error for all elements of the training sequence. This error is determined by the Formula (A8):  
\[E(W)=\sum_{i=1}^{n}E_{i},\] (A8)  
where \(n\) is the number of patterns in a training sequence. The minimization process is carried out using iterative methods. This begins with a randomly selected point in the W\({}_{0}\) weighting space and consists of determining the next points W\({}_{1}\), W\({}_{2}\),... so that E(W\({}_{0}\)) > E(W\({}_{1}\)) > E(W\({}_{2}\)) >... is seeking to find a global minimum of the E(W) error function spanning over the multidimensional space of the W weights. Before running the backpropagation algorithm, the weights are selected randomly, assuming an even distribution within a certain numerical range.