The invention discloses a cross-project
software defect prediction method for supervised expression learning. The method comprises the following steps: (1) selecting a defect
data set, and preprocessing defect data; (2) training a migration auto-
encoder in an unsupervised pre-training mode, wherein the migration auto-
encoder comprises a
feature coding layer and a
label coding layer; (3) with the help of a migration
cross validation method, selecting a sample closest to the
hidden layer feature distribution of the target project sample from all sample
hidden layer feature representations of thesource project as a validation set, and taking the rest as a
training set; (4) performing
oversampling processing on the
training set sample; (5) finely adjusting the migration auto-
encoder, and selecting a model hyper-parameter and an early stop strategy; and (6) inputting the preprocessed data of the target project into a migration auto-encoder, and obtaining a final prediction result through the output of a
label encoding layer. According to the method, the
label information of the source project sample is introduced into the feature representation learning process, so that the predictionperformance of the cross-project
software defect prediction model is improved.