[论文解读] Preserving Order of Data When Validating Defect Prediction Models
本研究采用时间序列验证(逐次向前)与非时间序列方法(交叉验证、自助采样法)对比评估缺陷预测模型的准确性,发现AUC存在显著差异——10折交叉验证的差异范围为-0.20至0.22,自助采样法的差异范围为-0.17至0.43,分别在45%和56%的案例中存在统计学差异。结果表明,在软件缺陷预测中,保持数据分割的时间顺序对实现真实可靠的模型评估至关重要。
[Context] The use of defect prediction models, such as classifiers, can support testing resource allocations by using data of the previous releases of the same project for predicting which software components are likely to be defective. A validation technique, hereinafter technique defines a specific way to split available data in training and test sets to measure a classifier accuracy. Time-series techniques have the unique ability to preserve the temporal order of data; i.e., preventing the testing set to have data antecedent to the training set. [Aim] The aim of this paper is twofold: first we check if there is a difference in the classifiers accuracy measured by time-series versus non-time-series techniques. Afterward, we check for a possible reason for this difference, i.e., if defect rates change across releases of a project. [Method] Our method consists of measuring the accuracy, i.e., AUC, of 10 classifiers on 13 open and two closed projects by using three validation techniques, namely cross validation, bootstrap, and walk-forward, where only the latter is a time-series technique. [Results] We find that the AUC of the same classifier used on the same project and measured by 10-fold varies compared to when measured by walk-forward in the range [-0.20, 0.22], and it is statistically different in 45% of the cases. Similarly, the AUC measured by bootstrap varies compared to when measured by walk-forward in the range [-0.17, 0.43], and it is statistically different in 56% of the cases. [Conclusions] We recommend choosing the technique to be used by carefully considering the conclusions to draw, the property of the available datasets, and the level of realism with the classifier usage scenario.
研究动机与目标
- 评估时间序列验证技术与非时间序列方法相比,是否会导致缺陷预测模型准确度结果产生差异。
- 探究软件项目发布版本间缺陷率的变化是否导致观察到的准确度差异。
- 根据缺陷预测模型的现实性与预期用途,为研究人员和实践者提供验证技术选择的指导。
- 评估数据排序对分类器性能的影响,基于真实世界中的开源与闭源项目进行评估。
提出的方法
- 对13个开源项目和2个闭源项目应用10种分类器,采用三种验证技术:10折交叉验证、自助采样法和逐次向前(时间序列)验证。
- 针对每种分类器与项目组合,使用受试者工作特征曲线下面积(AUC)衡量模型准确度。
- 采用逐次向前验证以保持时间顺序,确保训练数据在时间上先于测试数据。
- 对比不同验证技术下的AUC结果,识别具有统计学显著差异的情况。
- 分析各版本间的缺陷率,以探究验证技术间性能差异的潜在原因。
实验结果
研究问题
- RQ1验证技术的选择(特别是时间序列与非时间序列)是否会影响缺陷预测模型测量到的准确度?
- RQ2与10折交叉验证或自助采样法相比,使用逐次向前验证时,AUC值是否存在统计学显著差异?
- RQ3软件项目发布版本间缺陷率的变化是否能解释不同验证技术下模型准确度的差异?
- RQ4不同分类器与项目之间的性能差异如何变化?
主要发现
- 使用10折交叉验证测得的同一分类器AUC与逐次向前验证相比,差异范围为-0.20至0.22,其中45%的案例存在统计学显著差异。
- 使用自助采样法测得的AUC与逐次向前验证相比,差异范围为-0.17至0.43,其中56%的案例存在统计学显著差异。
- 缺陷率在不同版本间存在变化,表明缺陷数据的时间动态特性是导致不同验证技术间性能差异的重要因素。
- 本研究证实,非时间序列技术可能因未来版本的数据泄露而导致准确度估计产生误导。
- 逐次向前验证通过保持训练与测试数据的时间顺序,始终产生更真实的性能估计。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。