## 4 Results and Discussion
### Evaluating Results
We obtained a true positive rate (TPR) of above 85% plus for all the attack categories and normal connections. For excavation attacks, there were 0.0% false predictions made by the model. The performance of the activity recognition algorithm is shown in Table 5. A total of 80 video clips were run through the trained model to recognize each activity. As the test set contains 4 activities, each activity has 20 video clips. From 80 test videos, 70 were correctly recognized and the rest were misclassified. The model identified 18 out of 20 videos correctly for dumping and misjudged 2 videos as excavation and swinging, 1 of each. For the second activity, \"excavation\" was recognized in 17 out of 20 video clips correctly and misjudged in 3 as \"dumping\". For the third activity, \"hauling\" has shown the least favorable results compared with the rest of the categories. Out of 20, 16 videos were correctly identified while 4 video clips were misjudged as excavations. For the last activity, \"swing\" was classified correctly in 19 out of 20 video clips and misclassified in only 1 video clip as dumping. Figure 8: ROC curve for different activities of the excavator. The average precision of the test dataset for the 4 activities of dumping, excavation, hauling, and swing, is 81.8%, 77.3%, 100%, and 95%, respectively. The overall precision, recall, miss rate and accuracy of the activity recognition system are 87.5%, 88.52%, 12.5%, and 87.5%, respectively. The result shows that the third activity, \"hauling\" was misclassified the most among the other activities. Twenty (20)% of the total dataset is selected as a test dataset. The sequential pattern of the activities of the excavator usually starts from the excavation to hauling, dumping and swing. The 4 activity categories of excavators contain 80 video clips in total. The CNN-BiLSTM algorithm tested each video clip from the test set to verify the effectiveness of the trained model. The four activities of excavation, hauling, dumping, and swinging from the test data set are tested. The screenshots during the prediction of activity are shown in Figure 9a-d, respectively. The predicted label and ground truth have also been highlighted in Figure 9. The CNN-BiLSTM classification algorithm has classified the activities into their respective categories. The predicted and ground truth labels are compared to calculate the precision, recall, and accuracy of the algorithm. The average precision of the test dataset for dumping, excavation, hauling, and swing are 81.8%, 77.3%, 100%, 95%, and 18.2%, respectively. Similarly, the miss rates of these classes are 18.2%, 22.7%, 0.0%, and 5%, respectively. The average precision, recall and miss rates for the test dataset are 87.5%, 88.52%, and 12.5%, respectively. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{5}{c}{**Confusion Matrix**} \\ \hline \multirow{2}{*}{Dumping} & 13 & 1 & 0 & 1 & 86.70\% \\  & 21.00\% & 1.60\% & 0.00\% & 1.60\% & 13.30\% \\ \hline \multirow{2}{*}{Excavation} & 0 & 12 & 0 & 0 & 100\% \\  & 0.00\% & 19.40\% & 0.00\% & 0.00\% & 0.00\% \\ \hline \multirow{2}{*}{Hauling} & 0 & 1 & 17 & 0 & 94.40\% \\  & 0.00\% & 1.60\% & 27.40\% & 0.00\% & 5.60\% \\ \hline \multirow{2}{*}{Swing} & 0 & 0 & 0 & 17 & 100\% \\  & 0.00\% & 0.00\% & 0.00\% & 27.40\% & 0.00\% \\ \hline \multirow{2}{*}{Output Class} & 100\% & 86\% & 100\% & 94\% & 95.20\% \\  & 0.00\% & 14.30\% & 0.00\% & 5.60\% & 4.80\% \\ \hline \multirow{2}{*}{Target Class} & \multirow{2}{*}{Dumping} & \multirow{2}{*}{Excavation} & \multirow{2}{*}{Hauling} & \multirow{2}{*}{Swing} \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Confusion matrix of the validation dataset.