# Effective Feature Selection Methods to Detect IoT DDoS Attack in 5G Core Network
## 5 Experimental Results
### Feature Selection Using Wrapper Method
#### 5.3.3 Sequential Feature Selection  
SFS, which compares the combination of all feature subsets, was used in the DT, RF, and KNN algorithms. Among the classification algorithms in this study, it uses a single model. In this study, SFS feature selection was applied using both forward and backward selections. Using the same stratified K-fold method as that in the training stage, the best-performing feature subset was extracted based on the cross-validation score. Table 8 shows the classification evaluation results when using a subset of 5 or 10 features selected through the SFS. The table also shows the scores for each algorithm when all 55 features are used. When applying forward selection, the results of the experiment indicated that the DT and RF algorithms performed better with five features, whereas the KNN algorithm performed better with 10 features. In backward selection, the DT algorithm performed better with 10 features, and the RF and KNN algorithms performed better with 5 features. When the features for each selection method of the classification algorithm were used, all three classification algorithms (DT, RF, and KNN) increased in accuracy and F1-score compared with the base model.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **No. of Features** & **Accuracy** & **Precision** & **F1-Score** & **Recall** & **AUC** \\ \hline \multirow{3}{*}{DT} & 41 & 82.976\% & 89.013\% & 88.524\% & 93.522\% & 95.188\% \\ \cline{2-7}  & 55 (all) & 81.289\% & 87.272\% & 87.258\% & 93.082\% & 94.868\% \\ \hline \multirow{3}{*}{RF} & 39 & 86.705\% & 90.673\% & 90.629\% & 94.585\% & 95.967\% \\ \cline{2-7}  & 55 (all) & 86.537\% & 91.012\% & 90.709\% & 94.513\% & 95.911\% \\ \hline \hline \end{tabular}
\end{table}
Table 7: Multiclass classification performance using the feature subset selected through RFECV.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Algorithm** & **Direction** & **No. of Features** & **Accuracy** & **Precision** & **F1-Score** & **Recall** & **AUC** \\ \hline \multirow{3}{*}{DT} & Forward & 5 & 88.455\% & 92.09\% & 91.925\% & 94.859\% & 96.201\% \\  & Forward & 10 & 86.733\% & 91.025\% & 90.818\% & 94.428\% & 95.875\% \\ \cline{2-7}  & Backward & 5 & 86.733\% & 91.025\% & 90.818\% & 94.428\% & 95.875\% \\  & 10 & 88.687\% & 92.108\% & 92.132\% & 94.917\% & 96.244\% \\ \cline{2-7}  & - & 55 (all) & 81.289\% & 87.272\% & 87.258\% & 93.080\% & 94.868\% \\ \hline \multirow{3}{*}{RF} & Forward & 5 & 90.12\% & 94.38\% & 93.627\% & 95.465\% & 96.595\% \\  & Forward & 10 & 90.077\% & 93.91\% & 93.185\% & 95.447\% & 96.585\% \\ \cline{2-7}  & Backward & 5 & 92.026\% & 95.154\% & 94.457\% & 95.926\% & 96.95\% \\  & Backward & 10 & 89.86\% & 94.714\% & 93.606\% & 95.377\% & 96.527\% \\ \cline{2-7}  & - & 55 (all) & 86.537\% & 91.012\% & 90.709\% & 94.513\% & 95.911\% \\ \hline \multirow{3}{*}{KNN} & Forward & 5 & 82.313\% & 85.874\% & 86.924\% & 92.773\% & 94.818\% \\  & Forward & 10 & 82.413\% & 85.932\% & 86.993\% & 92.823\% & 94.851\% \\ \cline{1-1} \cline{2-7}  & Backward & 5 & 82.456\% & 85.539\% & 86.844\% & 92.772\% & 94.841\% \\ \cline{1-1} \cline{2-7}  & Backward & 10 & 82.466\% & 85.524\% & 86.805\% & 92.607\% & 94.758\% \\ \cline{1-1} \cline{2-7}  & - & 55 (all) & 70.038\% & 78.863\% & 77.96\% & 84.879\% & 90.055\% \\ \hline \hline \end{tabular}
\end{table}
Table 8: Multiclass classification performance using the subset in 5 or 10 features selected in the forward or backward direction through SFS.