# Enhancing Machine Learning Prediction in Cybersecurity Using Dynamic Feature Selector
## 7 Conclusions  
Network security has become an essential issue in any distributed system. Although a lot of machine learning algorithms have been experimented with to increase the efficacy of intrusion detection, it is still a major challenge for existing intrusion detection algorithms to achieve good performance. In this research we have dealt with two high dimensional network traffic datasets and proposed a novel Dynamic Feature Selector (DFS) algorithm which is based on feature selection and meta-learning technique. Our approach combined five prominent algorithms to process two well established datasets NSL-KDD and UNSW-NB15. Primarily, we conducted multiple feature engineering steps using statistical analysis like univariate test and Pearson coefficient test along with XGBoost importance, wrapper technique and information gain ratio to reduce feature dimensionality. The outputs generated from these algorithms were documented and used as input for a novel bagging ensemble technique known as the meta-learner. This meta-learner is used as an optimizer for feature \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{\begin{tabular}{c} **NSL-** \\ **KDD** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **Performance without Dynamic Feature Selector** \\ **GRU** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **Decision** \\ **LSTM** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **Random** \\ **Trees** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **CNN+** \\ **Forest** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **GRU** \\ **LSTM** \\ \end{tabular} } & \multicolumn{4}{c}{\begin{tabular}{c} **Bi-** \\ **LSTM** \\ \end{tabular} } & \multicolumn{4}{c}{\
\begin{tabular}{c} **Decision** \\ **Trees** \\ \end{tabular} } & \multicolumn{4}{c}{
\begin{tabular}{c} **Random** \\ **Forest** \\ \end{tabular} } \\ \hline
**Accuracy** & 98.96 & 97.04 & 95.47 & 97.94 & 99.37 & 99.1 & 99.04 & 95.15 & 99.63 & 99.65 \\ \hline
**F1** & 98.21 & 98.43 & 93.50 & 98.01 & 99.33 & 99.15 & 99 & 95.05 & 99.62 & 99.63 \\ \hline
**Precision** & 96.92 & 97.74 & 95.70 & 98.79 & 99.63 & 99.35 & 98.74 & 96.6 & 99.78 & 99.84 \\ \hline
**AUC** & 98.93 & 98.72 & 96.45 & 97.13 & 99.54 & 99.17 & 99.05 & 95.15 & 99.63 & 99.64 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: NSL-KDD Performance Metrics. \begin{table}
\begin{tabular}{c} **Random** \\ **Forest** \\ \end{tabular} \\ \hline
**Accuracy** & 91 & 90.12 & 88.93 & 85.31 & 90.98 & 91.91 & 90.75 & 89.28 & 86.8 & 92.76 \\ \hline
**F1** & 92.07 & 91.24 & 90.32 & 88.96 & 93.35 & 93.7 & 93.08 & 91.53 & 89.5 & 94.44 \\ \hline
**Precision** & 91.4 & 97.84 & 91.89 & 87.99 & 95.96 & 94.23 & 97.35 & 90.61 & 88.01 & 96.11 \\ \hline
**AUC** & 91 & 90.87 & 88.43 & 84.91 & 91.74 & 91.38 & 91.78 & 88.2 & 85.49 & 92.73 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: UNSW-NB15 Performance Metrics. selection and ranking from multiple feature subsets. The output of different feature selection process and algorithms are filtered in a stochastic process with the help of the meta-learner which consisted of five state of art classification techniques to increase the performance of the model. With the usage of DFS, we were able to reduce the number of features by more than 50% and increase the predictive performance significantly. DFS also suggested the best algorithms out of the five machine learning algorithms which is reproducible and deployment ready. Future research will include the extension of the DFS algorithm for reinforcement learning to prevent the intrusion in network. Self-learning techniques will enhance the performance of DFS and extend its application to datasets from other domains to produce a robust machine learning model. DFS will also be implemented on live network traffic to document its performance and adjust hyper-parameters of meta-learner to enhance cybersecurity. Conceptualization, M.A., K.E.N., R.G. and M.M.C. ; methodology, M.A. and K.E.N. ; software, M.A. ; validation, M.A., K.E.N. and R.G.