Partial discharge pattern recognition is of great significance to the determination of the insulation performance of cross-linked polyethylene (XLPE) cables. In the study of partial discharge pattern recognition of XLPE cables, traditional machine learning algorithms have problems such as slow convergence, easy over-fitting, and low recognition accuracy. To solve this problem, this paper adopts a method of partial discharge pattern recognition for XLPE cables based on parameter optimization XGBoost. Through building a cable partial discharge test platform, artificially construct four 35kV XLPE cable partial discharge defect models to obtain the original data, and use MATLAB software to complete the calculation of statistical characteristic parameters. The characteristic parameters are used as the input and the discharge type prediction result is the output. Through Cross-validation,learning The curve determines the optimal parameters to obtain an effective pattern recognition model. The experimental analysis results show that compared with the partial discharge pattern recognition methods such as decision tree, random forest, BP neural network and SVM, the method in this paper can further improve the recognition accuracy, and the overall recognition accuracy rate is 96.93%.#$NLKeywords:XLPE cable, pattern recognition, random forest, characteristic parameter, Partial Discharge