## 5 Algorithm Application and Results
### Evaluation of Components and Indicators
In Figure 9, it is possible to verify that, while there was a linear growth in time for the kernel size of 100, there was a plateau at the kernel size of 50. Therefore, it was better to not only utilize a kernel size equal to 50, but also to use more layers. This may change if the model is tested for a larger number of hidden layers or for other algorithms, but these data served as a starting point for further evaluations. \begin{table}
\begin{tabular}{l l l} \hline \hline  & \multicolumn{2}{c}{**Experimental Variables to Be Tested**} \\ \hline
**Batch Size** & **Kernel Size** & **Number of Hidden Layers** \\ \hline
32 & 50 & 1 \\
64 & 100 & 3 \\
128 & 400 & 7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Initial parameters of the FNN. When comparing the previous graphs and results, it is possible to conclude that the configuration of the parameters and algorithm architecture that brought the most-consistent and highest values of accuracy, while still taking the least time, was:  
* Batch size: 128;
* Number of hidden layers: seven;
* Kernel size: 50. Therefore, the chosen configuration for the FNN had a total of four dense layers, as shown in Figure 10.  
Figure 8: Comparison between the total training time and batch size for the FNN when fixing the kernel size to 50 (blue) and 100 (orange). Figure 9: Comparison between the total training time and the number of hidden layers for the FNN when fixing the kernel size to 50 (blue) and 100 (orange). Although the batch size can be defined for all algorithms, every one has specific characteristics that need to be altered individually. One example of this concerns the CNN, which not only has the kernel size, but also has filters and utilizes max pooling layers, which have their own individual parameters, namely the pool size. In these cases, the base parameters are maintained as much as possible, while each unique parameter must be individually studied. When optimizing the two RNN algorithms, the main obstacle was related to the training time. This was not only due to a large number of inputs, but also to the very nature of the algorithms, in which each neuron had a recurring unit, which further necessitated calculations and, thus, required additional computational power. Due to these restrictions, the optimization of the RNNs was limited to creating a model that requires a training time similar to that of the FNN and CNN. This optimization led to a simple algorithm that had only two recurring layers, each one with a kernel size equal to 10. The batch size was maintained from the previous analysis at the value of 128. Therefore, the chosen configuration for the GRU had a total of two recurrent GRU layers, as shown in Figure 11, and for the LSTM, there was a total of four dense layers, as shown in Figure 12.  
Figure 11: Graphic representation of the GRU’s configuration, chosen after the optimization process, with two layers. Figure 10: Graphic representation of the FNN configuration, chosen after the optimization process, with a total of 7 dense hidden layers. In comparison to the RNNs, the CNN algorithm did not have the training time as a limiting factor, and thus, it was possible to test multiple configurations, as done with the FNN. The first analysis conducted was to determine the batch size that would be used for the CNN. It is possible to see in Figure 13 that the overall batch size did not influence the training time greatly, while the size of the kernel did. Therefore, the chosen batch size was 64, as it is an average value that could be used as a base for the next variable testing. It is important to note that, although not explicitly shown in the following figures, the first criterion when choosing the variables was the achieved overall accuracy, and only after confirming that the differences in the accuracy were small, the time criterion was used. With the batch size chosen, the next variable studied was the kernel size.