The invention discloses a design method of a software defect prediction model based on a kernel principal component analysis algorithm. The method includes: step 1, determining a data set for traininga model, and dividing the data set into a training set and a test set; step 2, carrying out dimensionality reduction treatment on that training set by using a kernel principal component analysis algorithm: selecting kernel functions and determining parameter of the kernel functions, selecting dimensionality reduction dimensions, and then reducing the dimensionality of the training set; step 3, taking the reduced-dimension training set as input, selecting Gauss (RBF) function as SVM kernel function, defining value interval and step size, and using grid search to find the optimal solution of SVM parameter penalty factor C and kernel function parameter sigma through cross-validation experiment method of ten fold; step 4, testing the performance of the model through a test set, and completingthe design of the software defect prediction model. The invention can solve the problem of redundant data in the measurement element of the software defect, and improve the accuracy rate of the machine learning algorithm.