## 4 Methodology
### Data Filtering  
In data mining, ensuring data quality for subsequent mining stages is of utmost importance. Data preprocessing plays a vital role in accomplishing this objective. Its primary aim is to improve the quality of mining outcomes by cleaning the collected data, encompassing activities such as data transformation and dimensionality reduction. In discretization, one transforms continuous or numerical variables into discrete or nominal attributes by dividing them into a finite number of intervals [36; 37]. \begin{table}
\begin{tabular}{c c c} \hline \hline
**No** & **Feature** \\ \hline
1 & Bwd\_Avg\_Bulk\_Rate \\ \hline
2 & Fwd\_Avg\_Bytes\_Bulk \\ \hline
3 & Bwd\_Avg\_Packets\_Bulk \\ \hline
4 & Fwd\_Avg\_Bulk\_Rate \\ \hline
5 & Bwd\_PSH\_Flags \\ \hline
6 & Fwd\_Avg\_Packets\_Bulk \\ \hline
7 & Bwd\_Avg\_Bytes\_Bulk \\ \hline
8 & Bwd\_URG\_Flags \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of fields removed prior to feature selection. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Traffic Class** & \begin{tabular}{c} **Before Data** \\ **Cleaning** \\ \end{tabular} & \begin{tabular}{c} **Percentage before** \\ **Data Cleaning** \\ \end{tabular} & \
\begin{tabular}{c} **After Data** \\ **Cleaning** \\ \end{tabular} &
\begin{tabular}{c} **Percentage after** \\ **Data Cleaning** \\ \end{tabular} \\ \hline Benign & 13,484,708 & 83.070\% & 13,390,234 & 82.978\% \\ \hline DDoS & 1,263,933 & 7.787\% & 1,263,933 & 7.832\% \\ \hline Bot & 286,191 & 1.76\% & 286,191 & 1.773\% \\ \hline Brute Force & 380,949 & 2.347\% & 380,943 & 2.361\% \\ \hline Infiltration & 161,934 & 0.998\% & 160,639 & 0.995\% \\ \hline Dos & 654,300 & 4.032\% & 654,300 & 4.055\% \\ \hline Web Attack & 928 & 0.0055\% & 928 & 0.006\% \\ \hline Total & 16,232,943 & & 16,137,168 & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Quantity and percentage of each traffic class before and after data cleaning. Among the top ten data mining algorithms are machine learning approaches like naive Bayes, Apriori, decision trees, and leveraged data discretization [38; 39; 40]. By employing data discretization, these techniques construct more effective and efficient models. Moreover, transforming continuous features into discrete counterparts provides a representation that aligns with knowledge-level understanding, making them easier to comprehend, utilize, and explain than continuous attributes [38]. In a comparison study, [PERSON] et al. [40] examined the classification performance of 30 discretized algorithms utilizing a slow, rule-based decision tree and Bayesian learning techniques. Their work provides information on discretizations appropriate for a particular classifier type, those that work with all classifier types, and those that strike a decent balance between the number of intervals generated and the precision of classification. Data discretization divides the range into short intervals showing strong class coherence to determine a set of cut points for continuous features. Additionally, discretization techniques should reduce the number of intervals while maintaining a high degree of mutual dependency between classes and attributes. Because of this, we partitioned continuous features into \(k\) intervals, or portions, with a maximum of \(k-1\) cut points. The trade-off between the arity (number of intervals) and its effect on accuracy must be considered [38]. The subsequent section summarizes the data discretization process applied to a dataset containing \(N\) examples and \(C\) target classes. We apply an algorithm for discretization to transform the continuous attribute \(A\) into \(m\) discrete intervals represented by \(D=\{[d0,d1]\), \([d1,d2]\),..., \([dm-1,dm]\}\), where \(d0\) is the minimum value, dm is the maximum value, and \(di<di+1\) for \(i=0\), \(1\), \(\ldots\), \(m-1\). The resulting discrete representation \(D\) is a discretization scheme for attribute \(A\), and \(P=\{d1\), \(d2\),..., \(dm-1\}\) represents attribute \(A\)'s set of cut points [21].