# Predictive Analysis of Vehicular Lane Changes: An Integrated LSTM Approach
## 3 Results and Analysis
### Maneuver Classification
#### 3.1.3 Multilayer Perceptron (MLP)  
For commencing our analysis with the multilayer perceptron (MLP) methodology, the first step entailed the application of min-max normalization to the data. This preprocessing was essential for the construction of the MLP model into which all available features were initially fed. The model was refined using binary cross-entropy as the loss function and parameterized with an epoch size of 50, a batch size of 128, and a validation split constituting 20% of the dataset. With these preliminary configurations in place, training of the Keras-based MLP model proceeded. To enhance the model focus, a subsequent phase employed only a select set of heavily weighted features, namely \([id,v,v_{x},\theta,x]\), for training, adhering to the same procedural steps outlined in the initial phase. Post-experimentation, we undertook an in-depth exploration of the resulting data. Table 7 provides details on both the training and testing accuracies for the MLP model. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Best Training Set**} & \multicolumn{2}{c}{**Predicted Labels**} & \multicolumn{3}{c}{**Best Validation Set**} \\ \cline{2-7}  & \(-\)**1** & **+1** & & & \(-\)**1** & **+1** \\ \hline True & \(-\)1 & 38,612 & 92 & True & \(-\)1 & 5517 & 9 \\ Labels & \(+\)1 & 92 & 8855 & labels & \(+\)1 & 8 & 1273 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Confusion matrices of the top-performing SVM model. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Models**} & \multicolumn{2}{c}{**All Features**} & \multicolumn{2}{c}{**Selected Features**} \\ \cline{2-5}  & **Training (\%)** & **Testing (\%)** & **Training (\%)** & **Testing (\%)** \\ \hline SVC (kernel = poly) & 81.21 & 81.86 & 99.34 & 98.90 \\ SVC (kernel = rbf) & 81.21 & 81.86 & 98.90 & 98.81 \\ SVC (kernel = sigmoid) & 67.72 & 29.48 & 68.97 & 69.33 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Accuracy of SVM models. To facilitate a robust and critical assessment of these outcomes, an eightfold cross-validation method was applied. Table 8 presents the confusion matrices for both the training and validation sets corresponding to the top-performing MLP model. Across the multiple validation runs, the top-performing training and validation accuracies were found to be 99.61% and 99.75%, respectively, with an average validation accuracy stabilizing at 99.63%. Intriguingly, when the most optimally validated model was subjected to final testing, it exhibited an accuracy rate of 91.2%. In the segment concerning maneuver classification, nearly all employed methodologies--except for the SVM model using a sigmoid kernel--yielded highly commendable predictive accuracies, the majority of which exceeded 98%. Additionally, training the models on the selected features yielded notably improved prediction accuracies when compared with utilizing the complete feature set. Across all techniques deployed for lane change maneuver prediction, both logistic regression and LinearSVC emerged as top performers. Each registered an impressive accuracy of 99.63% on the testing dataset when trained on the selected features. This level of accuracy remained consistently high, even when subjected to eightfold cross-validation. To evaluate the model's predictive capacity for individual vehicle trajectories, we compared the ground truth maneuvers to those predicted by the model at each time step. Figure 6 graphically represents this comparison of three vehicles. While the blue line delineates the true maneuvers, the red line plots the predicted maneuvers. The black cross mark indicates the misclassified predicted maneuver. Although a close congruence between the predicted and actual data points is readily observable, there are some deviations, particularly at the beginning and the end of the lane-changing sequences.