[Paper Review] On the Need of Preserving Order of Data When Validating Within-Project Defect Classifiers
The paper compares time-series walk-forward validation with non-time-series methods (cross-validation and bootstrap) for within-project defect classifiers, showing notable AUC differences and suggesting validation choice depends on data properties and realism.
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.
Motivation & Objective
- Evaluate whether time-series validation yields different classifier accuracy (AUC) than non-time-series approaches for within-project defect prediction.
- Investigate whether changes in defect rates across releases explain observed differences between validation techniques.
- Apply 10 classifiers to 15 projects (13 open, 2 closed) using multiple validation schemes to quantify effects.
- Provide recommendations on selecting validation techniques based on dataset characteristics and realistic usage scenarios.
Proposed method
- Compute AUC for 10 defect classifiers on 15 projects using three validation techniques: cross-validation, bootstrap, and walk-forward.
- Preserve temporal order with walk-forward validation to prevent test data from being antecedent to training data.
- Compare AUC differences between walk-forward and the other two techniques and assess statistical significance.
- Analyze whether differences correlate with changes in defect rates across project releases.
Experimental results
Research questions
- RQ1Do time-series (walk-forward) validation and non-time-series validation yield different AUC measurements for within-project defect classifiers?
- RQ2Are observed AUC differences statistically significant across datasets and classifiers?
- RQ3Do changes in defect rates across releases explain any differences between validation techniques?
- RQ4How should practitioners choose a validation method given dataset properties and desired realism?
Key findings
- AUC differences between 10-fold cross-validation and walk-forward range from -0.20 to 0.22 for the same project/classifier.
- AUC differences between bootstrap and walk-forward range from -0.17 to 0.43 for the same project/classifier.
- In 45% of cases, the AUC difference between 10-fold cross-validation and walk-forward is statistically significant.
- In 56% of cases, the AUC difference between bootstrap and walk-forward is statistically significant.
- Defect rates changing across releases may contribute to differences in measured accuracy, motivating careful method selection.
- The authors recommend choosing the validation technique by considering dataset properties and realism of the classifier usage scenario.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.