## 5 Experimental Results
### SMOTE Results  
This section illustrates the findings of experiments carried out to classify DDoS attacks and benign traffic. The machine learning models selected for this challenge are decision tree (DT), XGBoost (XGB), logistic regression, KNN, and random forest (RF). The effectiveness of models trained on a balanced dataset using SMOTE is compared to those trained on the original imbalanced dataset. Moreover, the trade-offs between addressing class imbalance and preserving robust generalization are investigated. Table 3 summarizes the performance of each model, evaluated using traditional classification metrics. The SMOTE method is applied to balance the CICIoT2023 dataset to enhance the performance of the ML classifiers. To address class imbalance (96.87% DDoS, 3.13% benign), the SMOTE was applied. Table 3 details the class distribution before and after SMOTE, demonstrating the successful balancing of the dataset. The label distribution (pre-SMOTE) is 533,392 (96.87% of total) for class \"DDoS\" and 17,187 (3.13% of total) for class \"BENIGN\". Furthermore, the label distribution (after SMOTE) for class \"DDoS\" is 533,392 (50% of total) and 533,392 (50% of total) for class \"BENIGN\". Table 4 illustrates the performance of several machine learning models in classifying a target class (e.g., DDoS/BENIGN) without utilizing SMOTE. The RF model demonstrated the highest efficiency across all the evaluated metrics, including accuracy, \(F1\), recall, and precision. Similarly, logistic regression and KNN classifiers also achieved high values for these performance measures, indicating their ability to effectively differentiate between instances of DDoS and BENIGN. On the other hand, the decision tree classifier demonstrated similar, higher accuracy (approximately 100%), with XGBoost showing particularly poor performance (0.00% for precision, recall, and \(F1\) score). \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Classifier** & _Accuracy_ & _Precision_ & _Recall_ & **F1** \\ \hline XGB & 0.9687 & 0.0000 & 0.0000 & 0.0000 \\ Logistic Regression & 0.9960 & 0.9413 & 0.9278 & 0.9345 \\ KNN & 0.9996 & 0.9991 & 0.9892 & 0.9941 \\ Decision Tree & 1.0000 & 0.9997 & 1.0000 & 0.9999 \\ Random Forest & 1.0000 & 1.0000 & 1.0000 & 1.0000 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The evaluation of the machine learning models before SMOTE. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Label** & **Before SMOTE** & **Test** & **After SMOTE** & **Test** \\ \hline DDoS & 533,392 (96.87\% of total) & 106,676 & 533,392 (50\% of total) & 106,870 \\ BENIGN & 17,187 (3.13\% of total) & 3440 & 533,392 (50\% of total) & 106,487 \\ Total & 550,579 & 110,116 & 1,066,784 & 213,357 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Distribution of class labels before and after SMOTE. Table 5 illustrates the performance of the same machine learning classifiers after applying the SMOTE technique to address class imbalance. The RF model achieved the highest possible values across all metrics. DT and KNN models also demonstrated high performance, indicating strong discriminatory ability between the target class and other classes. While XGB achieved nearly identical accuracy, the logistic regression model achieved a lower accuracy (approximately 99.69%). The classification report of the RF classifiers after the SMOTE technique is applied is shown in Table 6. The model achieved perfect precision and recall (100%) for both DDoS and benign classes. Consequently, the \(F1\) score reached 100% for both classes, resulting in an overall accuracy of 100%. These results suggest highly effective classification performance after addressing class imbalance. The ROC curve is a widely utilized performance metric for evaluating machine learning models. The AUC values range from 0 to 1, where a higher AUC indicates better model performance in differentiating between DDoS attacks and benign cases. An AUC of 1 represents a perfect classifier, whereas an AUC of 0 indicates that all DDoS attacks are categorized as benign and vice versa.