针对跨项目缺陷预测的一种最近邻混合实例选择方法
A Hybrid Instance Selection Using Nearest-Neighbor for Cross-Project Defect Prediction
-
摘要: 为识别缺陷倾向模块, 软件缺陷预测(SDP)研究在软件工程领域非常活跃。SDP使得有限的测试资源可以有效地分配给易错模块。虽然SDP需要组织内部有足够的本地数据, 但是存在一些本地数据不可使用的情况, 如试点项目。事实上, 缺乏本地数据的组织可使用跨项目缺陷预测(CPDP)以提取外部数据构建分类器。使用CPDP面临的主要挑战是训练数据和测试数据的数据分布不同。为了解决此问题, 研究者会选择与目的数据类似的源数据实例构建分类器。总所周知, 软件数据存在分类不平衡问题, 即有缺陷的类别与无缺陷类别的比例非常低。一般它会频低分类器的性能。为此, 我们提出了一种使用最近邻法的混合实例选择方法(HISNN), 它选择性地执行一种学习本地知识(通过k最近邻算法)和全局知识(通过naive Bayes)的混合分类法。具有强本地知识的实例通过最近邻法被赋予同样的类别标签。以前的研究具有低PD(检测可能性)或者高PF(误警报可能性), 从而难以实际使用;而实验结果表明本文提出的HISNN具有较高的综合性能和高PD低PF。Abstract: Software defect prediction (SDP) is an active research field in software engineering to identify defect-prone modules. Thanks to SDP, limited testing resources can be effectively allocated to defect-prone modules. Although SDP requires sufficient local data within a company, there are cases where local data are not available, e.g., pilot projects. Companies without local data can employ cross-project defect prediction (CPDP) using external data to build classifiers. The major challenge of CPDP is different distributions between training and test data. To tackle this, instances of source data similar to target data are selected to build classifiers. Software datasets have a class imbalance problem meaning the ratio of defective class to clean class is far low. It usually lowers the performance of classifiers. We propose a Hybrid Instance Selection Using Nearest-Neighbor (HISNN) method that performs a hybrid classification selectively learning local knowledge (via k-nearest neighbor) and global knowledge (via naïve Bayes). Instances having strong local knowledge are identified via nearest-neighbors with the same class label. Previous studies showed low PD (probability of detection) or high PF (probability of false alarm) which is impractical to use. The experimental results show that HISNN produces high overall performance as well as high PD and low PF.