## 6 Description of Test Data
The genetic algorithm was limited to the construction of only fully connected neural networks and, for data on the angles of rotation and tilt of a mobile device, at least one recurrent layer is required, as the data are presented as a function of time. Figure 5 shows the graphs of the loss function for training neural networks, using all data from the test modules. Figure 4: Graphs of the loss function for training neural networks using the angles of rotation and tilt of a mobile device as test data. (**a**) is a graph for a neural network constructed using a genetic algorithm. (**b**) is a graph of a neural network that was designed using an analytical method. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Architecture** & **Number of Epochs for Training** & **Loss Function** & **Accuracy** \\ \hline Fully connected architecture built using a & 105 & 3.74362 & 0.1745234 \\ genetic algorithm & & & \\ Analytically built architecture (two recurrent layers & & & \\ + two fully connected layers) & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparative characteristics of neural network architectures based on test data. The training and testing errors decreased for both neural network architectures and tended to zero. Table 4 shows the comparative characteristics of the considered architectures. The accuracy rates for the two architectures shown in Table 4 are quite high, but the architecture using the genetic algorithm showed much better results and was able to increase the accuracy, bringing it closer to 100% without using recurrent layers. Figure 6 shows graphs of the loss function when training general neural networks. To construct general architectures, the results of the network constructed by the analytical method were taken, considering the angles of rotation and tilt of the mobile device, as well as the results of the network constructed using the genetic algorithm for all tests. The network training and testing errors decreased for the two neural network architectures, but the error for the architecture designed using the genetic algorithm tended to zero faster. Comparative characteristics of the considered architectures are presented in Table 5. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Architecture** & **Number of Epochs for Training** & **Loss Function** & **Accuracy** \\ \hline Fully connected architecture built using a & 90 & 0.000148 & 0.97295 \\ genetic algorithm & 35 & 0.00592 & 0.88725 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparative characteristics of architectures for building a neural network based on the data of testing modules. Figure 5: Graphs of the loss function for training a neural network according to the data of the testing modules. (**a**) shows a graph for a neural network developed using a genetic algorithm, while (**b**) shows a graph of a neural network designed using an analytical method. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Architecture** & **Number of Epochs for Training** & **The Function of Losses** & **Accuracy** \\ \hline Four fully connected layers in a network built & 55 & 0.00000241 & 0.83254 \\ using a genetic algorithm & & & \\ Three fully connected layers in a network built & 40 & 0.0000482 & 0.82152 \\ without use of a genetic algorithm & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparative characteristics of neural network architectures for building a general neural network. The accuracies of the neural networks with the architectures presented in Table 5 were approximately equal; however, the architecture built using the genetic algorithm had a much lower value for the loss function, which guarantees comparatively better forecasting results on future data. It should be noted that it is possible to select the architecture of a neural network using an exhaustive search or other methods.