| Object To investigate the risk factors of cardiovascular disease(CVD)in patients with rheumatoid arthritis(RA),and to establish a model of CVD risk in RA using machine learning algorithms in order to guide clinicians to early identify patients with RA prone to CVD and perform early intervention,so as to reduce the occurrence of CVD-related complications.Method1.From January 2019 to November 2022,414 RA patients who met the inclusion criteria in the Department of Rheumatology and Immunology of the Affiliated Hospital of Yangzhou University were collected,including 103 RA patients with CVD(RA-CVD)in the experimental group and 311 RA patients without CVD(RA-n CVD)in the control group.All RA patients met the 2010 American College of Rheumatology(ACR)/European League Against Rheumatism(EULAR)classification criteria for RA;the diagnosis of CVD met the diagnostic criteria for the corresponding disease.Comparisons between groups were performed using two independent samples t-test,Mann-Whitney U rank sum test and Chi-square test for univariate data analysis.2.Indicators that differed between the two groups screened by univariate analysis(P <0.05)were included in the machine learning model for further analysis as predictors of the risk of RA-CVD development.Four hundred and fourteen data were randomly divided into two parts according to a 7:3 ratio using random sampling,and 301 data were the training set,including 75 RA-CVD patients and 226 RA-n CVD patients.113 data were validation sets including 28 patients with RA-CVD and 85 patients with RA-n CVD.Five machine learning models,Logistic Regression(LR),Support Vector Machine(SVM),KNearest Neighbor(KNN),Random Forest(RF),and Limit Gradient Boosting(XGB),were constructed using different function packages of R language using training set data,and the model was optimized using cross-validation,and finally the model was tested by validating set data.Receiver operating characteristic curve(ROC curve)was plotted by p ROC package in R language,and the area under ROC curve(AUC value)was obtained to generate confusion matrix and calculate the accuracy,specificity,sensitivity and other comprehensive assessment of model prediction efficacy.According to the model evaluation index,the best prediction model was selected and the traditional Framingham risk assessment model and the Chinese resident cardiovascular disease risk assessment model(China-PAR)were used to compare the diagnostic efficacy.3.Based on R language and shiny APP,write an easy-to-use online assessment tool to visualize the best model.Results1.A total of 414 patients with RA were included in the study,including 103 patients with RA-CVD and 311 patients with RA-n CVD.Among RA-CVD patients,28(27.2%)were male and 75(72.8%)were female,aged 67.63 ± 9.89 years,duration of 42(12,124)months,49(47.57%)had hypertension and 24(23.30%)had diabetes.Among RA-n CVD patients,45(14.5%)were male and 266(85.5%)were female,aged 54.83 ± 11.80 years,duration of 36(12,120)months,54(17.36%)had hypertension and 23(7.40%)had diabetes.There was no statistically significant difference between the two groups in terms of smoking,alcohol consumption,region of residence,disease duration,systolic blood pressure,and diastolic blood pressure(P > 0.05).There were statistical differences in age,gender,body mass index(BMI),hypertension and diabetes between the two groups(P <0.05);there was no statistical difference in globulin,alanine aminotransferase,aspartate aminotransferase,serum creatinine,triglyceride and low-density lipoprotein cholesterol between the two groups(P > 0.05),and there were statistical differences in fasting blood glucose,total cholesterol,high-density lipoprotein cholesterol,D-dimer,erythrocyte sedimentation rate,and C-reactive protein(P < 0.05).There were no statistically significant differences between the two groups in peripheral blood CD3 + T lymphocytes,CD4 + T lymphocytes,CD8 + T lymphocytes,NK cells,CD19 + B lymphocytes,serum immunoglobulins(G,A,E,M),antinuclear antibodies,anti-double-stranded DNA antibodies,anti-SSB antibodies,rheumatoid factors,anti-cyclic citrullinated peptide antibodies,complement C3,complement C4,clinical disease activity index(CDAI)and simplified disease activity index(SDAI)(P > 0.05),while there were statistically significant differences between the two groups in DAS28-ESR,DAS28-CRP and antiSSA antibodies(P < 0.05).2.The sensitivity,specificity and accuracy of LR in the five machine learning models were 50%,94.12% and 83.19%,respectively.KNN had a sensitivity of 0%,a specificity of 74.55%,and a correct rate of 79.61%.SVM had a sensitivity of 80%,specificity of80.58%,and accuracy of 80.53%.RF had a sensitivity of 66.67%,specificity of 80.2%,and accuracy of 78.76%.The sensitivity,specificity and accuracy of XGB were 57.14%,82.61% and 77.87%,respectively.Among the five models,LR had the highest accuracy and specificity,SVM had the highest sensitivity,and KNN had the lowest sensitivity and specificity.The AUC values of the five models were > 0.8,suggesting that the reliability of the five algorithm models was high.According to the five algorithms,the KNN model had the worst diagnostic efficacy for RA-CVD,and the sensitivity,specificity,and accuracy of the SVM model were > 80%,showing the best performance.Although the specificity and accuracy of LR algorithm model are the highest,its sensitivity is < 60%,suggesting that the diagnostic efficacy for RA-CVD is insufficient and it is easy to cause missed diagnosis.Compared with the traditional Framingham model and China-PAR model,the sensitivity of SVM model is higher than that of the other two models,and the AUC value is the highest,suggesting that this model has good diagnostic efficacy.The aim of this study was to detect CVD risk early in RA patients,so the SVM algorithm model was selected for further study.3.An online assessment tool that can predict the risk of CVD in RA patients was constructed using the resulting optimal prediction model.Conclusion1.Fourteen risk factors associated with the development of RA-CVD were identified,including sex,age,hypertension,diabetes,BMI,fasting blood glucose,total cholesterol,high-density lipoprotein cholesterol,D-dimer,erythrocyte sedimentation rate,C-reactive protein,DAS28-ESR,DAS28-CRP,and anti-SSA antibodies.2.Based on a variety of machine learning algorithms,the optimal SVM model is selected and visualized,which can ideally predict the risk of CVD in RA and can be used as a clinical assessment tool for the risk of CVD in RA patients. |