# Machine-Learning-Based Darknet Traffic Detection System for IoT Applications
## 4 Results and Discussion
Based on the numbers reported by the matrix, it can be inferred  
Figure 8: Computational complexity analysis for employed machine-learning techniques. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **BAG-DT** & **ADA-DT** & **RUS-DT** & **O-DT** & **O-DSC** & **O-KNN** \\ \hline Accuracy \% & 99.5 & 95.4 & 93.9 & 97.3 & 83.6 & 97.1 \\ Error \% & 0.5 & 4.6 & 6.1 & 2.7 & 16.7 & 3.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Experimental results were obtained from other machine-learning techniques. that the majority of CIC-Darknet-2020 traffic data were truly classified, i.e., the green cells of the confusion matrix (the number of truly classified samples = TP + TN = 140,862 out of 141,530\(\rightarrow\)99.53%). In comparison, only a few (minority) of CIC-Darknet-2020 traffic data were falsely classified (the number of truly classified samples = FP + FN = 668 out of 141,530\(\rightarrow\)0.47%). Additionally, Figure 10b depicts the four-class PPV-FDR matrix analysis of the DTDS-BAG-DT system for each class. The observation of this matrix demonstrates that all classes are precisely predicted with more than 99% precision (PPV) for each class, scoring an overall precision (PPV) for the DTDS-BAG-DT system of 99.45%. Moreover, Figure 10c depicts the four-class TPR-TNR matrix analysis of the DTDS-BAG-DT system for each class. The observation of this matrix demonstrates that three classes out of four (i.e., Non-Tor, Non-VPN, and VPN classes) have very high sensitivity (TPR) rates, recording more than 98.9% sensitivity (TPR) rates. Only one class out of four (i.e., Tor class) has a lower sensitivity rate of 89.9, rendering the overall sensitivity (TPR) for the DTDS-BAG-DT system of 96.93%. Thus, the DTDS-BAG-DT system's overall performance can be described as accurate, precise, and sensitive in providing both Darknet detection and classification for the IoT network traffic network. Furthermore, Table 6 provides a summary of experimental performance evaluation factors obtained for the DTDS-BAG-DT model, displaying the values for classification accuracy (ACC), the positive predictive value (PPV), the true positive rate (TPS), the false discovery rate (FDR), the false-negative rate (FNR), the area under the curve (AUC), the classification speed (CS), and the number of misclassified samples (NMS). In addition to the high-performance rates obtained for ACC, PPV, TPR, and AUC, and the low error alarm rates obtained for ERP, FDR, FNR, and NMS, the system exhibits high-speed inferencing for DTDS-BAG-DT, with a CSP value of 110,000 samples per second, scoring a low prediction overhead of 9.09 \(\upmu\) second. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**ACC** & **PPV** & **TPR** & **HMS** & **ERP** & **FDR** & **FNR** & **AUC** & **NMS** & **CSP** \\ \hline
99.50\% & 99.45\% & 96.93\% & 98.18\% & 0.5\% & 0.55\% & 3.07\% & 100\% & 668 & 110,000 \\ \hline \end{tabular}
\end{table} 
Table 6: Results obtained for optimizable ensemble using bagging decision tree (BAG-DT) model. Figure 9: Learning process trajectory for BAG-DT model: minimum classification error vs. iterations. Last of all, we benchmark our proposed system with other existing systems. Specifically, in Table 7, we compare our best performance indication results, which correspond to the DTDS-BAG-DT system, with other up-to-date, state-of-the-art systems employing diverse learning approaches (deep and machine learning methods) to detect Darknet traffic activities. The comparison in this table considers the underlying learning method used in each Darknet detection system, the accuracy of detecting/classifying the Darknet activities, and the proportion of improvement factor (%) over the existing system.