Software Defect Prediction Using Traditional Machine Learning and Ensemble Learning Algorithms

Authors

  • S. M. Hasan Kabir Software Engineering, Daffodil International University, Bangladesh
  • Md. Tanim Rahman Software Engineering, Daffodil International University, Bangladesh
  • Aunik Hasan Mridul Computer Science and Engineering, Daffodil International University, Bangladesh https://orcid.org/0000-0002-5034-1087

DOI:

https://doi.org/10.47852/bonviewSWT52025645

Keywords:

software defect, bagging, boosting, ensemble, machine learning, recall

Abstract

Software defect prediction (SDP) leverages machine learning to identify potential defects in software systems, enhancing software quality and reducing maintenance costs. Traditional techniques like Naïve Bayes, Decision Trees, and support vector machines (SVM) have been widely used for defect prediction due to their simplicity and interpretability. However, ensemble techniques such as Random Forest (RF), AdaBoost, and Bagging have gained prominence for their ability to improve accuracy by combining multiple models. While these methods have demonstrated promising results, challenges like overfitting, imbalanced datasets, and inadequate model tuning remain critical for further improvement in SDP. There are various types of datasets available in online. We have selected four datasets. We employed RF, Logistic Regression (LR), Gradient Boosting (GB), K-Nearest Neighbor (KNN), Decision Tree (DT), and XGB Classifier. In order to thoroughly investigate and assess each model’s predictive potential for identifying software defects and the issues they cause, we also used ensemble approaches. The results were promising, with the KNN achieving a noteworthy test accuracy of 87.08% for Dataset PC1, KNN of 76.49% for dataset JM1, KNN of 81.45% for dataset KC1 and GB of 92.89% for dataset CM1. Furthermore, Boosting GB also demonstrated accuracy matching this high standard of 94.5% for dataset CM1. To further enhance performance, we implemented a range, including Bagging, Boosting, Stacking, and Voting algorithms, optimizing each classifier with the best parameters through hyperparameter tuning. Through our experimental investigation, we not only contributed to the body of knowledge on SDP but also identified the Gradient Boosting with Boosting model as the most accurate, achieving an outstanding accuracy rate of 94.5% for SDPs. This research endeavors to provide invaluable insights into software defect management, offering a potential solution for early intervention and ultimately improving software outcomes.

 

Received: 10 March 2025 | Revised: 22 April 2025 | Accepted: 12 May 2025

 

Conflicts of Interest

The authors declare that they have no conflicts of interest to this work.

 

Data Availability Statement

The data that support the findings of this study are openly available in Software Defect Prediction Datasets at https://github.com/SinghJasmeet585/Software-Defect-Prediction/tree/master/Data/data.

 

Author Contribution Statement

S.M. Hasan Kabir: Methodology, Software, Formal analysis, Data curation, Writing – original draft, Writing – review & editing. Md. Tanim Rahman: Software, Validation, Data curation, writing – original draft, Writing – review & editing. Aunik Hasan Mridul: Conceptualization, Software, Investigation, Resources, Data curation, Writing – review & editing, Visualization, Supervision, Project administration.

Downloads

Published

2025-05-27

Issue

Section

Research Article

How to Cite

S. M. Hasan Kabir, Md. Tanim Rahman, & Aunik Hasan Mridul. (2025). Software Defect Prediction Using Traditional Machine Learning and Ensemble Learning Algorithms. Smart Wearable Technology. https://doi.org/10.47852/bonviewSWT52025645