## 3 Artificial Neural Networks
### Neural Network Hyperparameters  
This section presents the neural network hyperparameters chosen for the study, including the number of neurons, hidden layers, epochs, and learning rate value. It is crucial to set these parameters accurately to avoid overfitting, underfitting, and lack of prediction accuracy. The selection of the number and dimensions of **hidden layers** is motivated by the problem's intricacy. Since the very complex trend of the sideslip angle time series, a neural network architecture with two hidden layers is employed in this work. Indeed, networks with two hidden layers are capable of representing functions of any shape and complexity, while, based on current understanding, there is no theoretical justification for using neural networks with more than two hidden layers [54]. The use of two hidden layers offersincreased modeling capacity while managing computational resources effectively. This configuration strikes a balance between complexity and training efficiency. There are many rule-of-thumb methods for determining the correct **number of neurons** to use in the first hidden layers. Choosing too few neurons can result in underfitting and high statistical bias. On the other hand, selecting too many neurons can lead to overfitting, high variance, and a longer training time. To achieve a balance between accuracy, generalization, and processing time, the following guidelines were followed:  
* The number of hidden neurons should be less than twice the size of the input layer;
* The number of hidden neurons should be between the size of the input layer and the size of the output layer. Starting from these observations, the number of neurons in the first hidden layer was set to 2/3 the size of the input layer plus one for the output layer size. Regarding the number of neurons in the second hidden layer, a looping mechanism was introduced to systematically explore various combinations of neurons in both hidden layers. The goal was to optimize the network's performance through multiple training sessions driven by the looping mechanism. Subsequently, the network configuration with the pair of neurons that minimized a specific error function was selected. The neural network with the optimal pair of neurons was subjected to additional training to assess if further performance improvement was achievable. If the performance showed positive enhancement during this additional training, the last trained network was retained. Otherwise, the previous configuration was reinstated. Ultimately, the best-performing neural network configuration, as determined by this process, was used for making predictions. Neuron initial weights are not defined because the correlation between input and output is not preventively known, so they were defined randomly by software. The number of epochs, that is, the number of presentations to the network of all patterns in the training set, was chosen equal to 200 to find the best trade-off between the quality of results and the network processing time. Once the epochs were chosen, the number of validation checks for early stopping was set too. Early stopping is a regularization technique where training is halted when the validation performance no longer improves, preventing overfitting. This value was set equal to the 20% of the number of epochs. The choice of activation functions influences the network's ability to capture nonlinearities in the data. For the type of data linked to this application, the hyperbolic tangent (tanh) activation function was chosen. This function maps input values to a range \((-1,1)\), and is commonly used in neural networks for its ability to model nonlinear relationships. Finally, it is important to underline that the networks have been trained with different dataset configurations to evaluate the effect on the estimation accuracy and the possible occurrence of overfitting. In more detail, the nets have been trained using both a dataset with all circuits and one without the circuit on which the prediction was then made.