Objective To construct a prediction model for stroke recurrence based on machine learning algorithms using routine laboratory tests.Methods A total of 437 stroke patients admitted to Shanghai Xuhui District Central Hospital from January 2010 to December 2023 were retrospectively followed up.Patients with stroke recurrence during the follow-up period were classified as recurrence group,while those without stroke recurrence were classified as non-recurrence group.The dataset was randomly divided into a training set and a validation set in a 7∶3 ratio.Blood lipid and routine blood test parameters at the initial stroke occurrence were collected.A 5-fold cross-validation method was used to develop prediction model in the training set based on machine learning algorithms including random forest(RF),XGboost,Adaboost,K-nearest neighbors(KNN)and Logistic regression(LR).The predictive performance of stroke recurrence prediction model was evaluated using receiver operating characteristic(ROC)curves and precision-recall(PR)curves.Results The average follow-up duration for the 437 stroke patients was 6.2 years,which 184 patients experienced stroke recurrence.In the training set,red blood cell(RBC)count,hemoglobin(Hb),mean corpuscular volume(MCV),the absolute value of lymphocytes(LYMPH#),total cholesterol(TC)and triglyceride(TG)were higher in recurrence group than those in non-recurrence group(P<0.05).The other parameters showed no statistical significance(P>0.05).In the validation set,RBC count,Hb,MCV,TC and TG were higher in recurrence group(P<0.05),with no statistical significance observed in the other parameters(P>0.05).In the training set,the XGboost demonstrated superior performance in predicting stroke recurrence,with higher areas under curves(AUC)and the area under precision-recall curve(PRAUC)compared to RF,Adaboost,KNN and LR.In the validation set,the prediction model constructed using XGboost achieved an AUC of 0.86 and a PRAUC of 0.82.Conclusions The stroke recurrence prediction model based on blood lipid and routine blood test parameters demonstrates promising clinical application value.