Reinforcing defect prediction: a reinforcement learning approach to mitigate class imbalance in software defect prediction
摘要
Software defect prediction (SDP) ensures software system quality and reliability. However, class imbalance poses a significant challenge, hindering traditional machine learning (ML) techniques. Biased models often result in impacting defect prediction accuracy. We provide a novel approach that uses reinforcement learning (RL) algorithms to overcome the class imbalance in SDP. Our objective is to enhance the predictive capabilities of defect prediction models and reduce the impact of class imbalance by combining RL approaches with random oversampling (RO) and reward–penalty mechanisms. The usefulness of the proposed approach in managing class imbalance and improving SDP performance is validated by experimental findings using NASA-MDP datasets. With precision and recall values of 89% and 96%, respectively, on the CM1 dataset, the suggested method attains a 93% accuracy on the test set. Furthermore, the proposed methodology uses a 1.96 ratio resource. Moreover, a 98% failure prediction rate is obtained. These results demonstrate how RL-based methods may be used to alleviate class imbalance and enhance the performance of SDP models in software engineering (SE).