# An Efficient NIDPS with Improved Salp Swarm Feature Optimization Method
## 4 Results and Discussion
### ML Classification before Applying Feature Selection and Class Balancing Methods  
The 4 different classifiers which were abundantly applied in previous studies are adopted by our proposed study, where an 80 (training)-20 (testing) split of data is used. The binary and multiclass classifications are both applied using 4 classifiers, where accuracy, precision, recall, and F1-score metrics are used for the evaluation of binary and multiclass data performances. Table 3 contains results for both types of classification and a visual illustration is shown in Figure 4.  
Figure 3: Binary and multiclass instances bar graph is shown in 4 sections: (**A**) binary class instances in the original dataset, (**B**) multiclass instances in the original dataset, (**C**) class balanced instances using SMOTE–Tomek for binary data, and (**D**) class balanced instances using SMOTE–Tomek for multiclass data.  
Table 3 shows binary classification results for 4 ML classifiers, where the performance of all classifiers varies slightly from 94 to more than 96%. The best classifier remains a random forest with 96.29% accuracy, 96.28% precision, 96.29% recall, and 96.28% F1-score. The worst classifier remains the gradient descent-boosting classifier as its training and testing time was also more than double and its scores remain at 94.16 accuracy and recall with 94.14 as precision and F1-score. The two methods of decision tree and extra tree remain in between, whereas the decision tree is outer bound to the extra tree in terms of accuracy score and according to other metrics as well. It showed a 95.61 score, which is lower bound to the extra tree performance score, which is 96.29%, which is nearer to the highest score achiever method random forest.  
However, if we look at multiclass classification scores, again random forest showed 82.58% accuracy and recall, 82.50% precision, and 81.44% F1-score. The worst score achiever (gradient descent boosting) again remained in multiclass classification with 81.42% accuracy, 81.31% precision, 81.42% recall, and 79.02% F1-score. Now, we look at F1-scores, which mainly contain the class-wise performance with class imbalance fact in it due to recall and precision scores sum and multiplication in its formula. Due to class imbalance, F1 reduces its score by comparing with accuracy, which is 82.58%, and F1 remains at 81.44%. Similarly, in the case of the worst performer gradient descent-boosting method. It reduces from 81.42  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Categories** & **Methods** & **Accuracy** & **Precision** & **Recall** & **F1-Score** \\ \hline Binary & Random Forest & 96.46 & 96.46 & 96.46 & 96.46 \\  & Extra Tree & 96.29 & 96.28 & 96.29 & 96.28 \\  & Decision Tree & 95.61 & 95.62 & 95.61 & 95.62 \\  & Gradient Descent Boost & 94.16 & 94.14 & 94.16 & 94.14 \\ Multiclass & Random Forest & 82.58 & 82.50 & 82.58 & 81.44 \\  & Extra Tree & 82.52 & 82.53 & 82.52 & 81.49 \\  & Decision Tree & 82.55 & 82.02 & 82.55 & 81.53 \\  & Gradient Descent Boost & 81.42 & 81.31 & 81.42 & 79.02 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Binary and multiclass classification results on original UNSW-NB15 dataset before applying feature selection and class balancing methods.  
Figure 4: Graphical illustration of 4 ML classifiers’ results before applying feature selection and data balancing methods.  
to 79.02. Therefore, class imbalance problems affect F1 scores for all classifiers, which need to be solved to make it nearer to accuracy.