JOURNAL ARTICLE

Q-Learning-Based Feature Selection for Software Defect Prediction

Abstract

Software defect prediction (SDP) is essential for improving software reliability and reducing maintenance costs. In dynamic development environments, traditional static feature selection methods often fail to adapt to evolving data patterns. This study introduces a Q-learning–based adaptive feature selection approach, integrated with a Random Forest classifier, to enhance SDP performance. The method applies a reward-driven selection process during training, dynamically identifying the most relevant features. Experiments were conducted on a real-world bug report dataset from Kaggle (136 instances, 6 features, ≈71% positive defect cases). Model performance was evaluated using accuracy, precision, recall, F1-score, and ROC–AUC. The proposed configuration achieved an accuracy of 10.71% and exhibited very low recall for minority classes, highlighting the strong impact of class imbalance. Comparative tests against conventional feature selection methods (e.g., ReliefF, mutual information) and alternative classifiers (e.g., SVM, Gradient Boosting) confirmed that the current approach underperforms state-of-the-art SDP models. Despite this, the study demonstrates a reproducible framework for integrating reinforcement learning into feature selection for SDP and identifies key improvement areas, particularly in reward function design, imbalance handling, and dataset expansion. These findings provide a foundation for developing more adaptive, imbalance-resilient defect prediction systems in future research.

Keywords:
Feature selection Computer science Software Artificial intelligence Selection (genetic algorithm) Feature (linguistics) Machine learning Software bug Programming language Philosophy

Metrics

0
Cited By
0.00
FWCI (Field Weighted Citation Impact)
18
Refs
0.43
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Topics

Software Engineering Research
Physical Sciences →  Computer Science →  Information Systems
Software Reliability and Analysis Research
Physical Sciences →  Computer Science →  Software
Software Engineering Techniques and Practices
Physical Sciences →  Computer Science →  Information Systems
© 2026 ScienceGate Book Chapters — All rights reserved.