Improving Software Defect Prediction: Resolving Data Imbalance with Ensemble Learning
摘要
Software Defect Prediction is an integral part of the software development process to ensure the quality and success of software products before they are used or handed over to users. Previously, software defect prediction was done using traditional methods that relied on statistical analysis and specific rules. However, these methods have time, cost, and accuracy limitations, especially in large and complex data. To overcome these weaknesses, this study proposes creating a software defect prediction model using ensemble learning with a stacking classifier approach that combines three basic algorithms: Random Forest, XGBoost, and LightGBM. The model was created using nine features, including codeline, cyclomatic complexity, inheritance tree depth, and several methods, which played an essential role in identifying potential software flaws. The dataset comprises 3000 synthetic data processed through feature normalization to improve model consistency. The model was tested with three spit data (60:40, 70:30, and 80:20) and evaluated using the fivefold cross-validation method to reduce variability and improve prediction stability. The experiment results show that the split data of 70:30 produces the best performance with an average accuracy of 94.48%, where the stacking approach can reduce the risk of overfitting, which can be seen from the stability of accuracy in the validation data. The Logistic Regression metamodel provides an advantage by simplifying the prediction results from the three basic models into a stable and accurate result. Thus, the ensemble learning-based stacking classifier approach has proven effective in improving the accuracy of software defect prediction, helping development teams allocate resources more efficiently to improve product quality and reliability.