## 4 Results
With all the features included in the proposed method, the accuracy was 99%, while [17] achieved an accuracy of 88% as shown in (a) part of Table 2. In (b) part of Table 2, the proposed method achieved 99% accuracy by using the PCA dimension reduction method with 30 features. In comparison, the [17] method achieved 90% accuracy with 15 features when it was applied to the PCA dimension reduction method. A proposed model based on 15 features achieved 94% accuracy compared to a model based on the same number of features in [17], which achieved 90% accuracy. The dimensional reduction algorithm significantly reduces the computational cost when applied to the ensemble model. (a) part of Table 3 compares the training and testing times to the features used. The ensemble model with PCA reduced the training and testing times compared to the same model using all features. The ensemble model significantly mitigated the training and testing times, in seconds, from 36.22 and 3.58 to 19.25 and 2.238, respectively. As a result of the specified PCA numbers, (b) part of Table 3 illustrates the execution time for each phase of the learning process and the testing process based on the specified PCA numbers. With the reduction in the number of PCAs, there is a reduction in the time needed to conduct the process. It is also noticed that the performance of most classifications is qualified. At the same time, several attacks cannot be classified very well, as seen in Figure 3. The numbers of 'U2R' and 'Heartbleed' are less than others, significantly affecting attack classification. In particular, there are only 52 'U2R' instances in the KDDTrain+ collection, making it difficult for the IDS to be classified correctly. Figure 2: Performance of the ensemble models. The proposed ensemble model chooses pertinent features for all classes and does not focus on a specific class. It does not guarantee the effectiveness of all attacks, particularly those with few instances in the datasets. However, the developed model can detect intrusions as the classification findings are relatively consistent across all datasets. The performance of the proposed IDS was evaluated by comparing it with the proposed PCA method with and without feature selection, as shown in Figure 4. The results of the study show that the proposed IDS with PCA outperforms the others when it comes to distinguishing benign instances from attacks. The average values of various metrics, such as accuracy, precision, and DR, have increased significantly. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{4}{c}{**(a)**} \\ \hline  & \multicolumn{2}{c}{**Without PCAs**} & \multicolumn{2}{c}{**With PCAs**} \\ \cline{2-5}  & **Training (s)** & **Testing (s)** & **Training (s)** & **Testing (s)** \\ \hline Ensemble & 36.22 & 3.9 & 19.256 & 2.238 \\ \hline RF & 5.4932 & 0.61308 & 4.4909 & 0.518 \\ \hline KNN & 2157.8 & 231.024 & 14.2809 & 1.600 \\ \hline ET & 0.1132 & 0.014409 & 0.0617 & 0.0073 \\ \hline \multicolumn{5}{c}{**(b)**} \\ \hline \multicolumn{5}{c}{**Number of PCA (Ensemble)**} & **Training (s)** & **Testing (s)** \\ \hline
10 & 13.403 & 1.604 \\ \hline
15 & 14.79 & 1.742 \\ \hline
20 & 16.081 & 1.894 \\ \hline
25 & 17.48 & 2.058 \\ \hline
30 & 19.256 & 2.238 \\ \hline
35 & 20.793 & 2.537 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: (a) The computational time of classifiers; (b) The computational time of ensemble classifier with the number of PCA. Figure 3: Confusion matrix of proposed IDS with 30 PCAs.