## 5 Results and Analysis
Figure 8 visualizes the relationship between the subject pedestrian headway distances and the speed values (actual and predicted) for different networks fed with UX, N = 20, 24, 30 data samples. The networks with the higher number of inputs can recapture the variability of the data points. As shown in the sub-figures, the algorithms with the optimal speed prediction results (best input combinations) have the highest \(R^{2}\) values (\((DF+D)\) and \((all)\)). In other words, the optimal algorithms capture the data points' variability better than algorithms with inputs of low impact on the speed. Figure 6: Visualization of the training and testing MSE values (using UX, N = 20, 24, 30 samples) according to different input variables for networks with two hidden layers, including three and two hidden perceptrons, respectively. The red dashed line corresponds to the networks with the lowest values of MSEs. To investigate the influence of the different distances in front and behind in heterogeneous and homogenous gender groups, we trained the same FFNN structure with data for experiments UF, UM, and UX with N = 20 pedestrians. As shown in Figure 9, the distance to the pedestrian behind significantly improves the speed prediction compared to the distance in front for experiments UF, UM, and UX as well. For the UX experiments (N = 20), the improvement provided by the distance behind is significant, 36%, compared to the \(D\) algorithm (see Figure 9, UX). It is less for experiments UF and UM composed of solely female (14%) and males (7%). Furthermore, the small sizes of the samples do to not  
Figure 8: Examples of speed predictions from testing the neural networks (\(D\), \(DF\), (\(DF+D\)), (\(DF+DP\)), (\(DP+D\)), (\(all\))) using UX, N = 20, 24, 30 samples. As observed in the actual data (in blue), the speed values for given headway distances tend to be close to the observed values when we combine DF and D as inputs to the FFNN algorithm or when we have more input features (\(all\)). The \(R^{2}\) values on the top-right of the figure are calculated to compare the variability of the estimated speed. Figure 7: Boxplots represent the training MSE results of the algorithms using UX, N = 20, 24, 30 samples with complexity (3, 2). The x-axis represents the algorithm inputs we applied, and the y-axis denotes the relative MSE calculated, with \(D\)-input algorithms as a reference case. allow us to systematically demonstrate statistically that the differences are significant, as the boxplots partly overlap. Nevertheless, the influence of the distance behind is observed for flow solely composed of males and females, especially for the females. It is, however, clearly more pronounced for the mixed gender flow. Therefore, it does not exclude that gender effects in the mixed flow, alternating male and female, reinforce the influence of the pedestrian behind. Further empirical analysis with more data samples should emphasize the influence of distance behind on pedestrian speed for homogeneous or random mixed gender groups. Figure 9: Boxplots represent the training MSE results of the algorithms with complexity (3, 2) using UF, UM, UX, and N = 20 samples. The x-axis represents the algorithm inputs we applied, and the y-axis denotes the relative MSE calculated, with \(D\)-input algorithms as a reference case.