## 3 Proposed Methodology
### Pre-Processing  
Numerous techniques were utilized to pre-process the input data for IDS. Pre-processing helps prepare the data for further analysis and modeling while also improving the effectiveness and precision of IDS. In this section, min-max normalization was utilized in the pre-processing stage.  
* Min-max Normalization  
Normalizing data is the first step in the min-max normalization technique. This model measures the feature values between the 0-1 range. This is attained by subtracting the minimum value of the characteristics from each value and dividing the results by the feature's range.  
* Synthetic Minority Oversampling Technique  
SMOTE (synthetic minority oversampling technique) is one of the most utilized oversampling techniques to create synthetic samples from the minority class. This is done using the K-nearest neighbors (KNN) approach and the Euclidean distance to form synthetic samples along the line segments joining the original minority class samples. It helps in managing overfitting problems and provides a good representation of the minority class, which makes it widely popular in the field of handling imbalanced datasets.  
SMOTE has been reported to need improvement, especially when small training datasets are in question, according to [PERSON] et al. [22]. GANSO outperforms SMOTE, as this study shows how GANSO works with generative adversarial network synthesis for data oversampling by creating more synthetic and realistic data than SMOTE [23]. The flexibility offered by the GANSO approach to create samples closer to the actual data distribution makes it more suitable in environments where data is scarce and variation is limited.  
The authors prove that even though SMOTE minimizes the dangers of data repetition and overfitting, it may fail to capture the myriad patterns within limited data sets. On the other hand, GANSO uses the adversarial process to help enhance the generated samples, resulting in better model performance. This study shows that GANSO could serve as a  
Figure 1: Proposed methodology for the current study.  
better substitute for SMOTE when the actual data distribution needs to be preserved in the data augmentation of small or imbalanced datasets.  
SMOTE is a standard over-sampling process [24]. SMOTE successfully minimizes overfitting problems and addresses data-oriented repetition by generating synthetic positive values in a feature space consisting of minority class instances and their related KNN. Given that the dataset includes both \(a\) negative and \(b\) positive samples, it is necessary to create synthetic samples for \(a-b\). Initially, from \(b\) samples, the sample \(y_{i}\) was randomly chosen. By employing Euclidean distance, the KNN of \(y_{i}\) in \(b\) instances was identified. The mathematical representation of estimating the Euclidean distance is expressed in Equation (1):  
\[d\big{(}y_{i},y_{j}\big{)}=\sqrt{\sum_{i}^{b}\Big{(}y_{i}^{l}-y_{j}^{l}\Big{)} ^{2}} \tag{1}\]  
Here, the Euclidean distance is denoted as \(y_{ik}\), where \(k=1,2,3,\ldots,5\). Lastly, the synthetic samples were created in Equation (2):  
\[y_{new}=y_{i}+rand(0,1).(y_{i}-y_{ik}), \tag{2}\]  
Here, the random number from 0 to 1 is represented as \(rand(0,1)\), indicating that \(y_{new}\) is positioned on the line connecting the initial data \((y_{i})\) and one of its neighbors \(y_{ik}\). The steps mentioned above were repeated to acquire additional synthetic minority samples. Hence, SMOTE proved its capability in managing unbalanced data.