Skip to main content
QUICK REVIEW

[论文解读] On the Need of Preserving Order of Data When Validating Within-Project Defect Classifiers

Davide Falessi, Jacky Huang|arXiv (Cornell University)|Sep 5, 2018
Software Engineering ResearchComputer Science参考文献 67被引用 47
一句话总结

本文将时间序列向前验证与非时间序列方法(交叉验证和自助法)在同一项目缺陷分类器中的效果进行比较,显示出显著的AUC差异并提示验证选择应取决于数据属性和现实性。

ABSTRACT

We are in the shoes of a practitioner who uses previous project releases’ data to predict which classes of the current release are defect-prone. In this scenario, the practitioner would like to use the most accurate classifier among the many available ones. A validation technique, hereinafter “technique”, defines how to measure the prediction accuracy of a classifier. Several previous research efforts analyzed several techniques. However, no previous study compared validation techniques in the within-project across-release class-level context or considered techniques that preserve the order of data. In this paper, we investigate which technique recommends the most accurate classifier. We use the last release of a project as the ground truth to evaluate the classifier’s accuracy and hence the ability of a technique to recommend an accurate classifier. We consider nine classifiers, two industry and 13 open projects, and three validation techniques: namely 10-fold cross-validation (i.e., the most used technique), bootstrap (i.e., the recommended technique), and walk-forward (i.e., a technique preserving the order of data). Our results show that: 1) classifiers differ in accuracy in all datasets regardless of their entity per value, 2) walk-forward outperforms both 10-fold cross-validation and bootstrap statistically in all three accuracy metrics: AUC of the selected classifier, bias and absolute bias, 3) surprisingly, all techniques resulted to be more prone to overestimate than to underestimate the performances of classifiers, and 3) the defect rate resulted in changing between the second and first half in both industry projects and 83% of open-source datasets. This study recommends the use of techniques that preserve the order of data such as walk-forward over 10-fold cross-validation and bootstrap in the within-project across-release class-level context given the above empirical results and that walk-forward is by nature more simple, inexpensive, and stable than the other two techniques.

研究动机与目标

  • 评估时间序列验证是否比非时间序列方法在同一项目缺陷预测中的分类器准确性(AUC)存在差异。
  • 研究在各版本之间缺陷率的变化是否能解释验证技术观察到的差异。
  • 使用多种验证方案将10个分类器应用于15个项目(13个开放源、2个闭源),以量化影响。
  • 基于数据集特征和真实使用场景,提供选择验证技术的建议。

提出的方法

  • 在15个项目上对10个缺陷分类器使用三种验证技术计算AUC:交叉验证、自助法和向前验证(time-series walk-forward)。
  • 在向前验证中保持时间顺序,防止测试数据在训练数据之前。
  • 比较向前验证与其他两种技术之间的AUC差异并评估统计显著性。
  • 分析差异是否与各项目版本之间缺陷率的变化相关。

实验结果

研究问题

  • RQ1时间序列(向前验证)与非时间序列验证在同一项目缺陷分类器中的AUC测量是否存在差异?
  • RQ2在不同数据集和分类器中观察到的AUC差异是否具有统计显著性?
  • RQ3各版本之间缺陷率的变化是否能解释验证技术之间的差异?
  • RQ4在给定数据集特征和期望的现实性下,实践者应如何选择验证方法?

主要发现

  • 同一项目/分类器的10折交叉验证与向前验证之间的AUC差异范围为-0.20至0.22。
  • 同一项目/分类器的自助法与向前验证之间的AUC差异范围为-0.17至0.43。
  • 在45%的情形中,10折交叉验证与向前验证之间的AUC差异具有统计显著性。
  • 在56%的情形中,自助法与向前验证之间的AUC差异具有统计显著性。
  • 各版本之间缺陷率的变化可能导致测量精度的差异,促使谨慎选择方法。
  • 作者建议在考虑数据集属性和分类器使用场景的真实程度后选择验证技术。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。