# An Improved Confounding Effect Model for Software Defect Prediction
## 2 Related Works  
Code metrics have correlations with software defects, so researchers use these code metrics to train machine learning models for predicting [9; 10; 11; 12; 13]. In the past two decades, many researchers have applied different machine learning models as classifiers to obtain satisfactory prediction results [4; 20; 21]. Different classifiers perform well in software defect prediction content [22; 23], such as logistic regression (LR) [24; 25; 26; 27], neural network (NN) [28], support vector machines (SVMs) [29; 30], naive Bayes [31], K-nearest neighbors [32], and Bayesian networks [22]. Logistic regression is the most commonly used classifier [33; 34; 35]. In recent years, [PERSON] et al. [27] applied logistic regression to deal with software defect prediction, and they paid attention to the privacy protection issue in the prediction process. Combining logistic regression with homomorphic encryption technology, a method that can protect the privacy of datasets and models, was proposed. However, this method had no advantage over traditional logistic regression models in terms of predictive ability. [PERSON] et al. [36] used logistic regression to deal with the problem of just-in-time defect prediction. The just-in-time defect prediction model classified potential defect changes at the check-in point. They identified six indicators from issue tracking systems to increase the indicator dataset and improve the performance of the JIT defect prediction model. [PERSON] et al. [37] used logistic regression technology to solve unbalanced data distribution challenge in the software defect prediction. Unbalanced data could cause the serious misclassification of software defects, thereby reducing the predictive model's performance. The authors combined logistic regression with cost-sensitive learning as the final classification model, effectively solving unbalanced data distribution. [PERSON] et al. [38] also used the logistic regression method in their article. Their paper was dedicated to solving unbalanced datasets and irrelevant features in softwaredefect prediction. They used bagging techniques and genetic models, which can deal with class imbalance and feature selection issues. Their method improved the classification ability of the predictive model. Feature selection methods are also applied in the field of software defect prediction. (1) In using filter-based feature ranking techniques, the information gain method [39] is an entropy-based method; the gain ratio method [40] compensates for the bias of information gain by penalizing multivalued features. (2) In filter-based feature subset selection, correlation-based feature subset selection [41] aims to identify subsets of features with a high correlation to class labels and a low correlation. Consistency-based feature subset selection [42] uses a metric called consistency to measure the quality of feature subsets. (3) The extraction-based feature selection method, a principal component analysis (PCA) method [43], is an extraction-based dimensionality reduction method, which converts the original variables that may be correlated with each other into a new set of the orthogonal variable. These new variables are called principal components. However, [PERSON] et al. [14] first declared that there are correlations between code metrics, which can cause confounding effects and bias prediction results. They investigated, identified, and examined the confounding effect of the size metric and declared that the size metric is a strong confounder. Additionally, they recommended considering removing the confounding effect of size before building a prediction model. [PERSON] et al. [15,16] systematically analyzed the extent of the confounding effect of different size metrics and proposed a linear regression-based method to remove the confounding effect of size. Their work significantly advances our knowledge about code metrics and their use in fault prediction. However, this practice is rarely taken by other researchers.