## 3 Proposed Methodology
### ML Classification  
There are three datasets that are evaluated and classified on binary and multi-class tasks. The original dataset is given to chi-square to select the top 16 features and then fed to ML classifiers to apply binary and multi-classification. However, to validate the newly generated data attacked categories instances and the original data, the (1) original (UNSW-NB15), (2) GAN and (3) original + GAN datasets are used to show the consistent behavior of all classifiers on binary and multi-class classifications.  
The holdout validation scheme is used by randomly splitting all data into an 80:20 ratio of training and testing. The decision tree, extra trees, random forest, logistic regression, k-nearest neighbor (KNN), and multi-layer perceptron (MLP) types of classifiers are applied to validate the performance of GAN-based data, and the feature-selection method is used by the proposed study. These are all discussed in detail in this section. The full framework-based algorithm is shown in Algorithm 1.  
```
Input: UNSW-NB15 dataset features \((FV_{i})\) Output: Classification of three datasets \(D_{1}\), \(D_{2}\), \(D_{3}\) Step 1: Take all features \((FV_{i})\). Step 2: Separate out minority class instances \((MV_{i})\). Step 3: Generate new minority class instances \((NMV_{i})\) using hyperparameter-optimized GAN model used in proposed study. Step 4: Separate out three datasets: Original UNSW-NB15 Dataset \((D_{1})\), combined data of newly generated minority class in Step 3 and original dataset based normal class instances \((D_{2})\) and combined data of original UNSW-NB15 instances + GAN based newly generated minority class instances \((D_{3})\) Step 5: Features normalization using Equations 1, 2, 3 and 4 on \(D_{1}\), \(D_{2}\), \(D_{3}\). Step 6: Apply chi-square feature selection on \(D_{1}\), \(D_{2}\), \(D_{3}\). Step 7: Obtained three feature sets \((GV_{i})\) based upon chi-square method using \(D_{1}\), \(D_{2}\), \(D_{3}\) Step 8: Conducted Experiments 1, 2 and 3 using \(D_{1}\), \(D_{2}\), \(D_{3}\) by feeding them to ML classifiers
```  
**Algorithm 1** Proposed-framework-based algorithm from features input to classification.  
The full algorithm is shown to give a step-by-step understanding of the proposed study. The input is taken from the UNSW-NB15 dataset by separating out the class attribute columns. However, at Step 2, based upon the category of each network attack type, the class-wise instances are separated out. In Step 3, the class-wise new instances from the given instances of UNSW-NB15 \((D_{1})\) are generated using the GAN model that is optimized with the hyper-parameters selection. To validate the performance of newly generated minority class instances and to cross check the performance as compared to the original dataset \((D_{1})\), three datasets \(D_{1}\), \(D_{2}\), and \(D_{3}\) are made in step 4. Features normalization on all three sets is performed using Equations (1)-(4) in Step 5. After applying features normalization, the most important features are selected using the chi-square method on all feature sets in Step 6. The selected features \((GV_{i})\) for each feature set are fed to six classifiers in Step 8, where both binary and multi-class classifications are performed in three experiments.