Within-project and cross-project defect prediction based on model averaging

Software defect prediction has an important impact on the national economy and financial service industry. Discovering defective modules in the early stage of software development has great significance. This paper proposes a within-project and cross-project defect prediction technology based on model averaging, which uses XGBoost and LightGBM algorithms in machine learning as candidate models and introduces model averaging theory to improve performance. First, two candidate models are used for probability prediction, and then each group is used as a test dataset to evaluate the model by the cross-validation method. Then, the model weight is determined by minimizing the sum of the squared prediction errors of all groups, and finally, the predicted probability of model averaging is obtained. Four typical public software defect datasets (NASA, AEEEM, ReLink, SoftLab) are used as test datasets, and the four indicators, precision, recall, F1 and AUC are used as evaluation criteria. For within-project defect prediction, compared with the XGBoost and LightGBM algorithms, the prediction results of the model averaging method on the four datasets are slightly better than the XGBoost and LightGBM algorithms, which also corresponds with the ensemble learning idea of model averaging theory. Compared with the seven traditional machine learning algorithms, the model average prediction method performed best on most of the data. For cross-project defect prediction, compared with the four benchmark methods, the model averaging method performs better overall. The experimental results show that the model averaging prediction method achieves good prediction results in both the within-project and cross-project defect scenarios.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-02-21
DOI
https://doi.org/10.1038/s41598-025-90832-4
Citations
4
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
12.98

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Within-project and cross-project defect prediction based on model averaging

Tong Li, Zhong Wang, Peibei Shi
4 citations
Scientific Reports
Software Engineering Research
12.98
article

Within-project and cross-project defect prediction based on model averaging

Tong Li, Zhong Wang, Peibei Shi
article en
4 citations

Abstract

Software defect prediction has an important impact on the national economy and financial service industry. Discovering defective modules in the early stage of software development has great significance. This paper proposes a within-project and cross-project defect prediction technology based on model averaging, which uses XGBoost and LightGBM algorithms in machine learning as candidate models and introduces model averaging theory to improve performance. First, two candidate models are used for probability prediction, and then each group is used as a test dataset to evaluate the model by the cross-validation method. Then, the model weight is determined by minimizing the sum of the squared prediction errors of all groups, and finally, the predicted probability of model averaging is obtained. Four typical public software defect datasets (NASA, AEEEM, ReLink, SoftLab) are used as test datasets, and the four indicators, precision, recall, F1 and AUC are used as evaluation criteria. For within-project defect prediction, compared with the XGBoost and LightGBM algorithms, the prediction results of the model averaging method on the four datasets are slightly better than the XGBoost and LightGBM algorithms, which also corresponds with the ensemble learning idea of model averaging theory. Compared with the seven traditional machine learning algorithms, the model average prediction method performed best on most of the data. For cross-project defect prediction, compared with the four benchmark methods, the model averaging method performs better overall. The experimental results show that the model averaging prediction method achieves good prediction results in both the within-project and cross-project defect scenarios.

Scientific ReportsVol. 15(1)
Hefei Normal University (CN)
National Natural Science Foundation of China, Hefei Normal University
Openalex Percentile: Top 2%
Software Engineering Research
12.98
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.