Published January 1, 2026 | Version v1

Software Defect Prediction Using Machine Learning: A Comparative Analysis Of Classification Algorithms

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

Files (721.5 kB)

Name Size
md5:d8d72b85ea189e186db5dfee2e78f8d0
721.5 kB Preview Download

Additional details