[Paper Review] TDSelector: A Training Data Selection Method for Cross-Project Defect Prediction
TDSelector is a novel training data selection method for cross-project defect prediction that enhances performance by combining instance similarity with defect density (number of defects per instance). Evaluated on 14 projects, it improves AUC by up to 10.6% compared to baseline methods, demonstrating that selecting instances with higher defect counts further boosts predictor accuracy.
In recent years, cross-project defect prediction (CPDP) attracted much attention and has been validated as a feasible way to address the problem of local data sparsity in newly created or inactive software projects. Unfortunately, the performance of CPDP is usually poor, and low quality training data selection has been regarded as a major obstacle to achieving better prediction results. To the best of our knowledge, most of existing approaches related to this topic are only based on instance similarity. Therefore, the objective of this work is to propose an improved training data selection method for CPDP that considers both similarity and the number of defects each training instance has (denoted by defects), which is referred to as TDSelector, and to demonstrate the effectiveness of the proposed method. Our experiments were conducted on 14 projects (including 15 data sets) collected from two public repositories. The results indicate that, in a specific CPDP scenario, the TDSelector-based bug predictor performs, on average, better than those based on the baseline methods, and the AUC (area under ROC curve) values are increased by up to 10.6 and 4.3%, respectively. Besides, an additional experiment shows that selecting those instances with more bugs directly as training data can further improve the performance of the bug predictor trained by our method.
Motivation & Objective
- To address poor performance in cross-project defect prediction (CPDP) due to low-quality training data selection.
- To overcome the limitation of existing methods that rely solely on instance similarity for training data selection.
- To propose a new method that incorporates both similarity and defect count per instance to improve training data quality.
- To empirically validate the effectiveness of the proposed method in enhancing defect prediction performance.
- To explore whether prioritizing instances with higher defect counts further improves prediction accuracy.
Proposed method
- TDSelector selects training instances by combining cosine similarity between instances and their defect density (number of defects per instance).
- It computes a composite score that balances similarity and defect count to rank and select the most informative training instances.
- The method uses a weighted combination of similarity and defect count, where higher values indicate better candidates for training data.
- The approach is evaluated using standard machine learning classifiers trained on the selected data.
- An ablation study evaluates the impact of selecting only high-defect instances, comparing it to the full TDSelector method.
- The method is applied across 14 projects from two public repositories, using 15 datasets for evaluation.
Experimental results
Research questions
- RQ1Can combining instance similarity with defect density improve training data selection in cross-project defect prediction?
- RQ2How does TDSelector compare to baseline methods that use only similarity in terms of AUC performance?
- RQ3Does selecting training instances with higher defect counts lead to further performance gains?
- RQ4Is the improvement from TDSelector consistent across diverse software projects?
- RQ5What is the contribution of defect density versus similarity in the final selection decision?
Key findings
- TDSelector-based bug predictors achieved higher AUC values than baseline methods, with improvements of up to 10.6% in specific CPDP scenarios.
- On average, the AUC was improved by 4.3% compared to baseline methods across the evaluated datasets.
- Selecting only instances with higher defect counts as training data further enhanced predictor performance when used in conjunction with TDSelector.
- The method demonstrated consistent performance gains across multiple projects, indicating robustness to project-specific variations.
- The integration of defect density significantly contributed to better training data selection, outperforming similarity-only approaches.
- The results suggest that defect density is a critical factor in training data selection for effective cross-project defect prediction.
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.