Skip to main content
QUICK REVIEW

[Paper Review] Preserving Order of Data When Validating Defect Prediction Models

Davide Falessi, Likhita Narayana|arXiv (Cornell University)|Sep 5, 2018
Software Engineering ResearchComputer Science49 references16 citations
TL;DR

This study evaluates defect prediction model accuracy using time-series validation (walk-forward) versus non-time-series methods (cross-validation, bootstrap), finding significant AUC differences—ranging from -0.20 to 0.22 (10-fold CV) and -0.17 to 0.43 (bootstrap)—with statistical differences in 45% and 56% of cases, respectively. The results highlight that preserving temporal order in data splits is critical for realistic model evaluation in software defect prediction.

ABSTRACT

[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.

Motivation & Objective

  • To assess whether time-series validation techniques yield different defect prediction model accuracy results compared to non-time-series methods.
  • To investigate whether changes in defect rates across software project releases contribute to observed accuracy differences.
  • To guide researchers and practitioners in selecting validation techniques based on realism and intended use of defect prediction models.
  • To evaluate the impact of data ordering on classifier performance using real-world open and closed-source projects.

Proposed method

  • Applied 10 classifiers to 13 open-source and 2 closed-source projects using three validation techniques: 10-fold cross-validation, bootstrap, and walk-forward (time-series).
  • Measured model accuracy using the Area Under the ROC Curve (AUC) for each classifier and project combination.
  • Used walk-forward validation to preserve temporal order, ensuring training data precedes test data chronologically.
  • Compared AUC results across techniques to identify statistically significant differences.
  • Analyzed defect rates across releases to explore potential causes for performance discrepancies.

Experimental results

Research questions

  • RQ1Does the choice of validation technique—specifically time-series versus non-time-series—affect the measured accuracy of defect prediction models?
  • RQ2Are there statistically significant differences in AUC values when using walk-forward validation versus 10-fold cross-validation or bootstrap?
  • RQ3Do changes in defect rates across software project releases explain the observed differences in model accuracy across validation techniques?
  • RQ4How do the performance differences vary across different classifiers and projects?

Key findings

  • The AUC of the same classifier measured via 10-fold cross-validation varied from -0.20 to 0.22 compared to walk-forward validation, with statistical differences in 45% of cases.
  • The AUC measured via bootstrap varied from -0.17 to 0.43 compared to walk-forward validation, with statistical differences in 56% of cases.
  • Defect rates were found to vary across releases, suggesting that temporal dynamics in defect data contribute to performance discrepancies between validation techniques.
  • The study confirms that non-time-series techniques can produce misleading accuracy estimates due to data leakage from future releases.
  • Walk-forward validation consistently produced more realistic performance estimates by preserving temporal order in training and test data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.