# Improving Software Defect Prediction in Noisy Imbalanced Datasets
## 2 Background
### Class Imbalance  
In machine learning, the quality of the dataset is one of the most important factors affecting performance. In the SDP field, dataset quality is mainly compromised by widespread serious imbalance and the introduction of noise caused by various factors.  
Class imbalance is as a key problem in machine learning and data mining [33]. It refers to an imbalance in the proportion of a dataset's different classes of instances. Since imbalanced defect datasets reduce the model's ability to learn defects [1], database rebalancing methods are often used to process the original dataset. There are various methods for rebalancing datasets.  
One method is undersampling, which balances the dataset by reducing samples from the majority class. The simplest form of undersampling is random undersampling, which balances the dataset by randomly reducing the samples in the majority class. [PERSON] proposed a two-stage under-sampling algorithm combining the DBSCAN clustering algorithm and graph-based procedure to face the class imbalance [34]. The disadvantage of undersampling is that it may cause the training data to lose important information from the majority of class samples [19].  
Another method for rebalancing datasets is oversampling. Oversampling balances a dataset by adding a minority class of sample data. Random oversampling (ROS) randomly replicates minority class samples, but this can lead to severe overfitting. Most current research instead balances the dataset by generating minority class samples. This method of oversampling often develops sample generation strategies based on the common assumption in the machine learning community that closer instances are more similar than more distant ones [35]. One sample generation strategy, MAHAKIL, determines Mahalanobis distance to generate samples [21], but this method does not work when the number of instances in a few classes is less than their dimensionality, as this generates overly diverse data that reduces the model's ability to find defects [36]. Another strategy, COSTE, generates samples based on complexity [37], but further investigation is needed to validate its assumption that there is less information about defects in complex samples. [PERSON] discussed the impact of class imbalance in few-shot learning and pointed out the effectiveness of oversampling to rebalance datasets [38].  
The SMOTE algorithm proposed by [PERSON] et al. in 2002 is one of the most commonly used oversampling methods in academia [20]; it generates minority class samples using k-NN spatial distance. However, this method may increase the risk of overfitting and also increase the false positive rate of prediction results [39]. Researchers have proposed variantsof SMOTE to minimize these drawbacks [40]. [PERSON] proposed a range-controlled SMOTE to alleviate the increasing of overlaps between different classes around the class boundaries caused by SMOTE [41]. [PERSON] et al. [42] proposed combining SMOTE with TomekLinks (SMOTE_TomekLinks) and with the edited nearest neighbor rule (SMOTE_ENN). [PERSON] et al. [43] proposed Borderline-SMOTE. [PERSON] et al. [44] added different weights for different minority instances (ADASYN). [PERSON] et al. applied k-means clustering [45] and self-organizing maps [46] to the SMOTE method (kmeans-SMOTE and SOMO). [PERSON] et al. [47] added Gaussian random variables to the SMOTE synthesis sample process (Gaussian-SMOTE). [PERSON] et al. [48] gave the minority sample weight based on its distance to the nearest majority sample (MWMOTE). Recently, [PERSON] et al. [36] proposed an algorithm to automatically optimize the parameter combination in SMOTE: k = number of neighbors, m = number of synthetic examples to create, and r = power parameter for the Minkowski distance (SMOTUNED).