## 3 Results for LSTM and 1-D CNN
### Results for 1-D CNN  
The performance of the one-dimensional convolutional neural network (1-D CNN) in the classification task is summarized in the confusion matrix presented in Figure 5. The matrix shows the number of predictions made by the model for each class compared to the true classes. From the matrix, we can observe the following:  
* The model has a high accuracy in classifying the 'Green' class, with 25 true positives and no false positives or false negatives;
* The 'Yellow' class was mostly classified correctly, with 23 true positives. However, there was one instance of misclassification, where a 'Green' was incorrectly labeled as 'Yellow', and one instance where 'Yellow' was incorrectly labeled as 'Red';
* The 'Red' class also shows high accuracy with 25 true positives, and there were no instances of 'Red' being misclassified as either 'Green' or 'Yellow'. * Overall, the model demonstrates a strong ability to discriminate between the classes, with a total of only two misclassifications out of 75 observations. The results indicate that the 1-D CNN has learned to classify the three classes with high accuracy, which is evident from the high true positive rates and low misclassification rates. The model's robustness in classification suggests that the features learned during training are highly discriminative for the given task. The statistical performance of the 1-D convolutional neural network (1-D CNN) is quantitatively summarized in Table 5. The evaluation metrics provided are precision, sensitivity (also known as recall), specificity, F1 Score, and overall accuracy, which offer a comprehensive view of the model's performance across the three classes: Green, Yellow, and Red. Precision quantifies the number of true positive predictions in relation to the number of true positive and false positive predictions. Sensitivity measures the proportion of actual positives correctly identified. Specificity reflects the model's ability to identify actual negatives, while the F1 Score provides a balance between precision and sensitivity. Accuracy is the proportion of true results, both true positives and true negatives, in the dataset. For the 'Green' and 'Red' classes, the model exhibits high precision of 96.15%, indicating that the model has a high likelihood of correct positive classification. Both classes also have perfect sensitivity at 100.00%, showing that all actual positives were identified. Figure 5: Confusion Matrix for the 1-D CNN classification results. The specificity for these classes is 98.00%, suggesting that the model is just as robust in correctly identifying negatives. The F1 Score of 98.03% for these two classes indicates an excellent balance between precision and sensitivity. The 'Yellow' class has an outstanding precision of 100.00%, indicating that every instance classified as 'Yellow' was correct. However, the sensitivity is slightly lower at 92.00%, suggesting that there were some 'Yellow' instances that the model did not identify. The specificity is at a maximum, and the F1 Score is 95.83%, reflecting the slightly lower sensitivity. The overall accuracy of the model was calculated to be 97.33%, which signifies a high level of correct predictions across all classes. This demonstrates that the 1-D CNN is exceptionally proficient at classifying the dataset with a minimal margin of error. In conclusion, the 1-D CNN exhibits strong predictive performance across all classes, with high values in precision, specificity, and F1 scores. The slight variance in sensitivity for the 'Yellow' class suggests potential areas for model improvement. The overall metric evaluations illustrate the effectiveness of the model in the given classification task. The training process of 1-D CNN is illustrated in the graph shown in Figure 6. The graph displays two primary aspects of training progression: the accuracy and loss over iterations. The top half of the graph depicts the accuracy of training and validation over the course of training iterations.