Software defect prediction method based on improved snake optimization algorithm
LIU Weiguang
YANG Suqi
ZHANG Wenning
LI Xuexiang
Abstract:To address the challenges of low prediction accuracy and difficulty in parameter optimiza-tion faced by traditional random forest in the field of software defect prediction,a refined method called ISO-RF is proposed,utilizing an improved snake optimization algorithm to optimize random for-est model.The improvements to the snake optimization algorithm are as follows.Firstly,the popula-tion positions are initialized using the Lévy flight strategy to enhance the initial diversity of the popu-lation.Next,an update strategy based on the sine-cosine disturbance factor and a mutation strategy for the young snakes based on an adaptive mechanism are introduced to enhance the local search capa-bility and avoid falling into local optima.The performance of the ISO in optimization is evaluated by comparing it with the original snake optimization algorithm and four classic algorithms across 11 benchmark test functions.The results indicate that the ISO algorithm achieves higher convergence ac-curacy and greater stability.Furthermore,addressing the class imbalance problem prevalent in the field of software defect prediction,the ISO is used to optimize the parameters of the random forest model.The proposed ISO-RF method enhances the prediction accuracy of the random forest model.Experimental results on 10 public datasets from three projects show that the ISO-RF algorithm signifi-cantly outperforms other comparative algorithms in terms of recall,F1-measure,and MCC,demon-strating certain promotional value.
Keywords:software defect predictionimproved snake optimizationrandom forest
Publication Date:2025-02-25
Online Publishing Date:2025-08-15(First online date of this platform, not the publication date of the document)
Pages:11( 1-11 )
