• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2023, Vol. 45 ›› Issue (05): 830-839.

• Software Engineering • Previous Articles     Next Articles

A software defect prediction algorithm based on optimized random forest

TANG Yu1,DAI Qi2,YANG Zhi-wei1,YANG Ai-min1,CHEN Li-fang1,3   

  1. (1.College of Science,North China University of Science and Technology,Tangshan 063210;
    2.Department of Automation,China University of Petroleum (Beijing),Beijing 102249;
    3.Hebei Key Laboratory of Data Science and Application,Tangshan 063210,China)
  • Received:2022-07-03 Revised:2022-10-24 Accepted:2023-05-25 Online:2023-05-25 Published:2023-05-16

Abstract: The traditional random forest application in the field of software defect prediction has the problems of low prediction accuracy and difficulty in parameter optimization, to address these deficiencies, we propose a new software defect prediction algorithm for optimizing random forest parameters with fractional-order variation sparrow (FMSSA-RF). Firstly, the fractional mutation sparrow algorithm is used to improve the global search capability of conventional FMSSA. The FMSSA algorithm has the advantage of faster convergence speed and higher optimization accuracy in the four benchmark functions. Secondly, the Fractional Mutation Sparrow Algorithm is used to optimize the random forest parameters. Finally, the FMSSA-RF algorithm is performed on the field of software defect prediction. The experimental results show that the evaluation index of the FMSSA-RF algorithm is significantly better than that of the other three comparative algorithms on four groups of ten public software defect data sets, which proves that FMSSA-RF algorithm has higher prediction accuracy and better stability. The results of Friedman ranking and Holm’s post-hoc test also show that the FMSSA-RF algorithm has obvious statistical significance.

Key words: fractional variant sparrow algorithm, random forest, software defect prediction