## 3 Proposed Approach
### Data Preprocessing  
Data preprocessing is a vital phase in both data analysis and machine learning workflows, where raw data are transformed into a refined, structured format, ready for effective analysis. This process encompasses a range of tasks, including handling missing values, removing duplicates, eliminating outliers or irrelevant data, selecting meaningful features, and applying normalization or standardization to numerical features. Additionally, class resampling techniques are employed to address imbalanced data. Proper data preprocessing significantly enhances data quality, minimizes noise, and optimizes the performance of machine learning models by enabling them to learn efficiently from the processed dataset. The specific steps and techniques required for preprocessing vary depending on the dataset. The NF-UNSW-NB15-v2 dataset, despite its comprehensiveness, contains missing or NaN values that must be addressed as part of the initial preprocessing step by removing them. Following this, any duplicate entries are eliminated. Outliers are then identified and removed using both the Z-Score and LOF methods. Next, a feature selection technique, based on correlation, is applied to reduce dimensionality. Numerical features are normalized using the MinMaxScaler 1.2.2 to achieve consistent scaling across the dataset. Once these preprocessing steps are completed, the dataset is split into training and testing subsets. Subsequently, the training and testing sets are recombined, and the ADASYN technique is applied to the combined dataset. This approach enhances learning from both the training and testing data. After ADASYN generates synthetic samples based on the combined training and testing datasets, the synthetic samples are added to the dataset. The dataset is then split again, where the new training set consists of the original training data along with the ADASYN-generated samples, while the test set remains unchanged. This strategy allows the model to learn more effectively from the augmented data and improves its overall performance. This strategy helps mitigate class imbalance, ultimately improving model accuracy and performance. Additionally, the ENN method is employed to under-sample the training data, and class weights are adjusted during model training to further balance the dataset. Our comprehensive data preparation process, encompassing outlier removal, feature selection, normalization, resampling, and model development, is depicted \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type of Attack** & **Samples Counts** & **Description** \\ \hline Benign & 99,000 & Normal, non-malicious flows. \\ \hline Fuzzers & 20,645 & An attack in which the attacker transmits significant volumes of random data, resulting in system crashes while also seeking to identify security vulnerabilities within the system. \\ \hline Analysis & 770 & A category that encompasses various threats aimed at web applications via ports, emails, and scripts. \\ \hline Backdoor & 833 & A method designed to circumvent security measures by responding to specifically crafted client applications. \\ \hline DoS & 4172 & \
\begin{tabular}{c} Denial of service refers to an attempt to overwhelm a computer system’s resources, aiming to impede access to or availability of its data. \\ \end{tabular} \\ \hline Exploits & 29,905 &
\begin{tabular}{c} Sequences of commands that manipulate the behavior of a host by exploiting a known vulnerability. \\ \end{tabular} \\ \hline Generic & 5992 & A technique that targets cryptographic systems, resulting in a collision with each block cipher. \\ \hline Reconnaissance & 11,171 & A method used to collect information about a network host, also referred to as probing. \\ \hline Shellcode & 1427 & Malware that infiltrates code to take control of a victim’s host. \\ \hline Worms & 164 & Attacks that self-replicate and propagate to other computers. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Types of attacks in the NF-UNSW-NB15-v2 dataset.