## 4 Experiment Results  
This section presents the experiment results using finest hyperparameters \(\lambda^{*}\) of each classification model resulting from \(A\). \(X_{train}\) was submitted to an isolated trial-validation test using K-fold cross-validation (10 folds per trial) [65]. This provided better generalization in the learning process, monitoring the average results of each trial. Then, the final models were scored using each testing set \(X_{test}\) for the balanced ISCX-Bot-2014 and CIDDS datasets in terms of the following performance metrics: Accuracy, Recall, and F1-score. In order to compare the results of the improvements of the proposed methodology (SMOTE + GS), ISCX-Bot-2014 and CIDDS-001 were tested with the same algorithm portfolio but without any balancing or hyperparameter0 optimization techniques. Tables 6-9 show the performance scores of each dataset. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Algorithm (\(a\))** & \(\lambda\) & **Values /Ranges** \\ \hline \multirow{6}{*}{KNN} & \multirow{6}{*}{Algorithm used to compute nearest neighbors} & Ball tree, \\  & & KD tree, \\  & & Brute Force \\  & No. of neighbors to use & \{1, 50\} \\  & Weight function used in prediction & Uniform, \\  & & By distance \\ \hline \multirow{6}{*}{SVM} & Penalty parameter C of error term & \{0.0001, 0.001, 0.01\} \\  & Decision function of shape & One-vs-one, \\  & & One-vs-rest \\  & Kernel type to be used in algorithm & Polynomial, \\  & & Linear, \\  & & RBF \\ \hline \multirow{6}{*}{LR} & Inverse of regularization strength of term C & \{0.0001, 0.001, 0.01, 0.1\} \\  & Norm used in penalization function & \(\ell_{1}\), \\  & & \(\ell_{2}\) \\ \cline{1-1}  & \multirow{2}{*}{Algorithm to use in optimization problem} & Linear \\  & & LBFGS \({}^{*}\), \\ \cline{1-1}  & & SAG \({}^{\ddagger}\), \\ \hline \multirow{6}{*}{DT} & Maximum tree depth & \{1, 30\} \\  & No. of features to consider for best split & \{1, 100\} \\ \cline{1-1}  & Strategy used to choose split at each node & Sqrt, \\ \cline{1-1}  & & Log\({}_{2}\) \\ \cline{1-1}  & & Best, \\ \cline{1-1}  & & Random \\ \hline \multirow{6}{*}{RF} & Use bootstrap samples when building trees & True, False \\  & Function to measure split quality & Entropy, GINI \$ \\ \cline{1-1}  & Max tree depth & \{1, 30\} \\ \cline{1-1}  & No. of features to consider for best split & \{1, 30\} \\ \cline{1-1}  & Min. no. of samples required to be at \\ \cline{1-1}  & leaf node & \{1, 30\} \\ \cline{1-1}  & Min. no. of samples required to split \\ \cline{1-1}  & internal node & \{1, 30\} \\ \cline{1-1}  & No. of trees in forest & \{1, 10\} \\ \hline \hline \end{tabular} \({}^{*}\) Limited-memory BFGS; \({}^{\ddagger}\) Stochastic Average Gradient; \({}^{\ddagger}\) Fast Incremental Gradient Method;\({}^{\ddagger}\) GINI Index.  
\end{table} 
Table 5: Algorithms with their inherent hyperparameters and values. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Algorithm** & **Precision** & **Recall** & **F1-Score** \\ \hline KNN & 0.9949 & 0.9968 & 0.9958 \\ SVM & 0.8648 & 0.8968 & 0.8762 \\ LR & 0.7002 & 0.7012 & 0.7049 \\ DT & 0.9958 & 0.9928 & 0.9906 \\ RF & 0.9970 & 0.9922 & 0.9915 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Unbalanced CIDDS-001 scores. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Algorithm** & **Precision** & **Recall** & **F1-Score** \\ \hline KNN & 0.9936 & 0.9954 & 0.9915 \\ SVM & 0.7832 & 0.7907 & 0.7826 \\ LR & 0.6861 & 0.6944 & 0.6895 \\ DT & 0.9947 & 0.9929 & 0.9932 \\ RF & 0.9930 & 0.9951 & 0.9947 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Unbalanced ISCX-Bot-2014 scores.