Published January 1, 2026
| Version v1
Journal article
Open
Software Defect Prediction Using Machine Learning: A Comparative Analysis Of Classification Algorithms
Authors/Creators
Description
Identifying defect-prone modules before release is a central concern in software quality assurance, and machine-learning classifiers built on static code metrics have become a common way to prioritise testing effort. This paper presents a controlled comparison of six classification algorithms — Naive Bayes, Decision Tree, k-Nearest Neighbours, Logistic Regression, Support Vector Machine, and Random Forest — for software defect prediction on four datasets from the NASA/PROMISE repository (CM1, KC1, JM1, PC1). All models are trained and evaluated under an identical pipeline, including median imputation, feature standardisation, SMOTE-based resampling of the training folds, and stratified 10-fold cross-validation, and are compared using accuracy, precision, recall, F1-score, and ROC-AUC. Random Forest achieved the strongest overall performance (86.7% accuracy, 81.2% F1-score), followed by Support Vector Machine, while Naive Bayes and k-Nearest Neighbours lagged behind, particularly on precision. The results indicate that ensemble tree methods provide a robust default choice for defect prediction from static metrics, and that resampling strategy meaningfully narrows the performance gap between algorithms.
Files
IJSET_V14_issue4_209.pdf
Additional details
Related works
- Has part
- Journal article: https://www.ijset.in/wp-content/uploads/IJSET_V14_issue4_209.pdf (URL)
- Is identical to
- Journal article: https://www.ijset.in/software-defect-prediction-using-machine-learning-a-comparative-analysis-of-classification-algorithms/ (URL)