Comparison of methods for balancing data in KNN.
收藏NIAID Data Ecosystem2026-05-02 收录
下载链接:
https://figshare.com/articles/dataset/Comparison_of_methods_for_balancing_data_in_KNN_/29853905
下载链接
链接失效反馈官方服务:
资源简介:
Coronary heart disease (CHD) is a major cardiovascular disorder that poses significant threats to global health and is increasingly affecting younger populations. Its treatment and prevention face challenges such as high costs, prolonged recovery periods, and limited efficacy of traditional methods. Additionally, the complexity of diagnostic indicators and the global shortage of medical professionals further complicate accurate diagnosis. This study employs machine learning techniques to analyze CHD-related pathogenic factors and proposes an efficient diagnostic and predictive framework. To address the data imbalance issue, SMOTE-ENN is utilized, and five machine learning algorithms—Decision Trees, KNN, SVM, XGBoost, and Random Forest—are applied for classification tasks. Principal Component Analysis (PCA) and Grid Search are used to optimize the models, with evaluation metrics including accuracy, precision, recall, F1-score, and AUC. According to the random forest model’s optimization experiment, the initial unbalanced data’s accuracy was 85.26%, and the F1-score was 12.58%. The accuracy increased to 92.16% and the F1-score reached 93.85% after using SMOTE-ENN for data balancing, which is an increase of 6.90% and 81.27%, respectively; the model accuracy increased to 97.91% and the F1-score increased to 97.88% after adding PCA feature dimensionality reduction processing, which is an increase of 5.75% and 4.03%, respectively, compared with the SMOTE-ENN stage. This indicates that combining data balancing and feature dimensionality reduction techniques significantly improves model accuracy and makes the random forest model the best model. This study provides an efficient diagnostic tool for CHD, alleviates the challenges posed by limited medical resources, and offers a scientific foundation for precise prevention and intervention strategies.
冠心病(Coronary heart disease, CHD)是一类主要心血管疾病,对全球健康构成严重威胁,且患病人群愈发年轻化。其诊疗与预防面临诸多挑战:传统治疗手段成本高昂、康复周期漫长且疗效有限。此外,诊断指标的复杂性以及全球医疗专业人员短缺问题,进一步加剧了精准诊断的难度。本研究采用机器学习技术分析冠心病相关致病因素,并提出一套高效的诊断与预测框架。为解决数据不平衡问题,本研究采用SMOTE-ENN方法,并选取决策树(Decision Trees)、K近邻(KNN)、支持向量机(SVM)、极端梯度提升树(XGBoost)以及随机森林(Random Forest)五种机器学习算法开展分类任务。主成分分析(Principal Component Analysis, PCA)与网格搜索(Grid Search)用于模型优化,评估指标涵盖准确率(accuracy)、精确率(precision)、召回率(recall)、F1值(F1-score)以及AUC(曲线下面积)。根据随机森林模型的优化实验结果,初始不平衡数据集的准确率为85.26%,F1值为12.58%;经SMOTE-ENN数据平衡处理后,准确率提升至92.16%,F1值达到93.85%,分别提升了6.90%与81.27%;在此基础上加入PCA特征降维处理后,模型准确率提升至97.91%,F1值升至97.88%,相较于SMOTE-ENN处理阶段分别提升了5.75%与4.03%。这表明结合数据平衡与特征降维技术可显著提升模型性能,且随机森林模型为最优模型。本研究为冠心病提供了一套高效的诊断工具,缓解了医疗资源匮乏带来的挑战,并为精准预防与干预策略提供了科学依据。
创建时间:
2025-08-07



