摘要
目的 利用UCI平台心脏病数据集,比较与评估四种传统机器学习模型在心脏病预测中的有效性.方法 采用逻辑回归、支持向量机、随机森林和决策树 4 个机器学习模型算法对心脏病进行预测,计算其准确性、精确度、召回率和F1分数等指标评估模型的性能.结果 通过计算准确性、精确度、召回率和F1分数等指标,发现逻辑回归分类器在预测心脏病发病率方面表现出更优的性能.结论 研究结果表明,逻辑回归分类器在预测心脏病发病率方面具有较好的性能,可为相关医疗实践提供借鉴.
Abstract
Objective To compare and evaluate the effectiveness of four traditional machine learning models in heart disease prediction using UCI heart disease data set.Methods Four machine learning model algorithms,including logistic regression,support vector machine,random forest and decision tree,were used to predict heart disease,and the accuracy,precision,recall and F1 score of the model were calculated to evaluate the performance of the model.Results By calculating metrics such as accuracy,precision,recall,and F1 score,the logistic regression classifier was found to exhibit superior performance in predicting the incidence of heart disease.Conclusion The results show that the logistic regression classifier has good performance in predicting the incidence of heart disease,which can provide reference for related medical practice.