## 3 Methodology
### Automation of Pit Stop Decisions Using a Neural Network
#### Output Feature  
The output feature determines the type of prediction that we are pursuing: classification or regression. In a classification problem, the NN is trained to decide on one of several possible classes. In our case, this would be pit stop or no pit stop, which is a binary output. In a regression problem, the NN tries to predict a quantity, such as race progress remaining until the next pit stop. Since this feature is not available in the database, we added it manually for a comparison of the two prediction types. In our test, we found that classification works much better than regression. The main reason for this is that our manually added output feature is independent of unexpected race events, since we do not know when the teams would have made their pit stop without the event. Consequently, with a regression output, the NN cannot recognize that a change in the example input feature FCY condition is related to a change in the output feature, as outlined in Table 4. We therefore opted for classification. We tested many different input features that were created on the basis of domain knowledge. These were assessed in an iterative process, since the prediction quality depends on both the feature set and the network architecture. Table 5 contains the input feature set that performs best on our data (the metric will be explained later) in combination with the final NN architecture. Race progress and tire age progress are numerical features, and the rest are categorical features. Since the races are similar in distance but differ in the number of laps (depending on the track length), both progress features are normalized by the total number of laps of a race. Tire age progress is furthermore processed such that it increases 50% more slowly during VSC and 75% more slowly during SC phases, as the tires are significantly less stressed during FCY phases. The position is split into leader and pursuers. It turned out that the leader often decides differently to his pursuers, e.g., when a safety car appears. Relative compound names are preferred over absolute ones (A1, A2, etc. ), as they enable better comparison between different seasons and race tracks. Furthermore, the central compounds A2, A3, A4, and A5 are much more strongly represented in the database, \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Lap** & **FCY Condition** & **Output Feature (Classification)** & **Output Feature (Regression)** \\ \hline
10 & Not active & No pit stop & 0.1 \\
11 & Not active & No pit stop & 0.05 \\
12 & Active & Pit stop & 0.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of example output features in a classification and a regression approach. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Seasons** & **Average Age Hard** & **Average Age Medium** & **Average Age Soft** \\ \hline \(\leq\) 2015 & – & 33.3\% & 26.8\% \\ \(\geq\) 2016 & 38.8\% & 34.6\% & 31.6\% \\ Overall & 38.8\% & 34.1\% & 29.5\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the average tire age (normalized by race length) when tires are changed, depending on the relative compound and season. The values apply to data filtered according to Section 3.2.2.  
which would cause training issues. The race track category feature was added as an indicator of the absolute level of tire stress on the respective race track. The categorization is given in Table 12 in the Appendix A. It is based on the hardest absolute tire compound available for the respective race track in the 2019 season. Thus, Category 1 contains tracks with high tire stress, whereas the stress is lowest in Category 3. The five possible FCY status values are defined in Table 6. It is important to distinguish between whether an FCY phase starts in the current lap or has already been active for some time. In most cases, drivers enter the pits in the first lap of an FCY phase.