Imbalanced data classification is a critical challenge in machine learning. To address the performance limitations of traditional K-nearest neighbors and its variants in such tasks, this paper proposes a two-stage classification model that integrates dynamic boundary oversampling(DBO), ensemble learning, and an improved KNN method. The proposed approach first employs a DBO strategy at the data level to adaptively generate minority class samples, constructing multiple balanced subsets. Then, at the algorithm level, a double weighted class credibility K-nearest neighbors base classifier- 引用格式:冯忠居,于明威,张聪,等.冲刷场地地震波形对大直径变截面单桩时程响应的影响[J].河北大学学报(自然科学版),2026,46(4):337-348.引用格式:胡桂开,代祉含.基于动态边界过采样与改进KNN的不平衡数据分类算法[J].河北大学学报(自然科学版),2026,46(4):413-423.DOI:10.3969/j.issn.1000-1565.2026.04.009基于动态边界过采样与改进KNN的不平衡数据分类算法胡桂开1,代祉含2(1.东华理工大学 理学院,江西 南昌 330013;2.东华理工大学 数字经济与资源管理学院,江西 南昌 330013)摘 要:不平衡数据分类是机器学习中的一项关键挑战.针对传统K近邻(K-nearest neighbors, KNN)及其变体在此任务中性能不佳的问题,本文提出了一种融合动态边界过采样、集成学习与改进K近邻的两阶段分类模型.首先,在数据层面采用动态边界过采样策略(dynamic boundary oversampling, DBO),自适应地生成少数类样本以构建多个平衡子集;其次,在算法层面为每个子集构建一个双重加权类可信度K近邻(double weighted class credibility K-nearest neighbors algorithm, DWCCKNN)基分类器,通过加权机制修正近邻计数并强化边界判别;然后,通过集成学习机制聚合预测结果以提升模型的准确性;最后,利用多个公开数据集将本文方法与经典过采样方法进行对比分析.结果表明:相对SMOTE-CCKNN、ADASYN-CCKNN及Borderline-SMOTE-CCKNN等方法,本文所提方法协同数据、算法与模型3层技术,有效提升了不平衡数据的分类性能.关键词:不平衡数据;KNN;过采样;集成学习中图分类号:TP181 文献标志码:A 文章编号:1000-1565(2026)04-0413-11DOI:10.3969/j.issn.1000-1565.2026.04.009Algorithm for imbalanced data classification based on dynamic boundary oversampling and improved KNNHU Guikai1, DAI Zhihan2(1. School of Science, East China University of Technology, Nanchang 330013,China;2.School of Digital Economics and Resource Management, East China University of Technology, Nanchang 330013, China)Abstract: Imbalanced data classification is a critical challenge in machine learning. To address the performance limitations of traditional K-nearest neighbors and its variants in such tasks, this paper proposes a two-stage classification model that integrates dynamic boundary oversampling(DBO), ensemble learning, and an improved KNN method. The proposed approach first employs a DBO strategy at the data level to adaptively generate minority class samples, constructing multiple balanced subsets. Then, at the algorithm level, a double weighted class credibility K-nearest neighbors base classifier- 收稿日期:2025-12-08;修回日期:2026-03-24 基金项目:国家自然科学基金项目(11661003;12561069);江西省自然科学基金项目(20192BAB201006) 第一作者:胡桂开(1977—),男,东华理工大学教授,博士,主要从事回归模型统计推断、机器学习及其应用方向研究.E-mail:huguikai97@163.com 第4期胡桂开等:基于动态边界过采样与改进KNN的不平衡数据分类算法河北大学学报(自然科学版) 第46卷is built for each subset,which employs a weighting mechanism to rectify the neighbor-counting bias and enhance boundary discrimination.Subsequently, an ensemble learning mechanism aggregates the prediction results to improve the model's accuracy. Finally, comparative experiments are conducted on multiple public datasets to evaluate the proposed method against classic oversampling approaches. The results demonstrate that, compared to methods such as SMOTE-CCKNN, ADASYN-CCKNN, and Borderline-SMOTE-CCKNN, the proposed approach effectively enhances the classification performance for imbalanced data by synergistically combining techniques at the data, algorithm, and model levels.
HU Guikai
,
DAI Zhihan
. Algorithm for imbalanced data classification based on dynamic boundary oversampling and improved KNN[J]. Journal of Hebei University(Natural Science Edition), 2026
, 46(4)
: 413
-423
.
DOI: 10.3969/j.issn.1000-1565.2026.04.009
[1] Zhang S C, Li X L, Zong M, et al. Learning k for knn classification[J]. ACM Trans Intel Syst Technol, 2017, 8(3): 1-19.DOI: 10.1145/2990508.
[2] García Pedrajas N, Del Castillo J A R, Cerruela-García G. A proposal for local k values for k-nearest neighbor rule[J]. IEEE Transactions on Neural Networks and Learning Systems, 2015, 28(2): 470-475.DOI: 10.1109/TNNLS.2015.2506821.
[3] Pan Z B, Wang Y K, Pan Y W. A new locally adaptive k-nearest neighbor algorithm based on discrimination class[J]. Knowl Based Syst, 2020, 204: 106185.DOI: 10.1016/j.knosys.2020.106185.
[4] Zhang C, Zhong P, Liu M, et al. Hybrid metric K-nearest neighbor algorithm and applications[J]. Mathematical Problems in Engineering, 2022, 2022: 1-15.DOI: 10.1155/2022/8212546.
[5] Gao L Z, Lu C Y, Guo G D, et al. Quantum K-nearest neighbors classification algorithm based on Mahalanobis distance[J]. Front Phys, 2022, 10: 1047466.DOI: 10.3389/fphy.2022.1047466.
[6] 胡桂开, 杨沛融. 基于条件概率分布的混合距离度量方法及应用[J]. 河北大学学报(自然科学版), 2025, 45(5): 520-529.DOI:10.3969/j.issn.1000-1565.2025.05.008.
[7] Dudani S A. The distance-weighted k-nearest-neighbor rule[J]. IEEE Trans Syst, Man, Cybern, 1976,6(4): 325-327.DOI: 10.1109/TSMC.1976.5408784.
[8] 童先群, 周忠眉. 基于属性值信息熵的 KNN 改进算法[J]. 计算机工程与应用, 2010, 46(3): 115-117.DOI:10.3778/j.issn.1002-8331.2010.03.034.
[9] 肖辉辉,段艳明.基于属性值相关距离的KNN算法的改进研究[J].计算机科学,2013,40(增刊2):157-159.DOI: 10.3969/j.issn.1002-137X.2013.z2.040.
[10] 蔡瑞光,张德生,张晓.基于双向选择的伪近邻算法[J].计算机工程与应用,2021,57(13):102-107. DOI: 10.3778/j.issn.1002-8331.2006-0021.
[11] Leng Q K, Guo J M, Jiao E J, et al. NanBDOS: Adaptive and parameter-free borderline oversampling via natural neighbor search for class-imbalance learning[J]. Knowledge-Based Systems, 2023, 274: 110665.DOI: 10.1016/j.knosys.2023.110665.
[12] 陈丽萍,王洪海,何舒平.一种基于数据分布的不平衡数据过采样方法[J].安徽大学学报(自然科学版),2024,48(5):26-36. DOI:10.3969/j.issn.1000-2162.2024.05.005.
[13] Koziarski M. Radial-based undersampling for imbalanced data classification[J]. Pattern Recognit, 2020, 102: 107262.DOI: 10.1016/j.patcog.2020.107262.
[14] 严涛,江开忠,姜新盈,等.基于高斯混合聚类采样的不平衡数据处理方法[J].计算机应用与软件,2023,40(12):305-311. DOI: 10.3969/j.issn.1000-386x.2023.12.045.
[15] Lv Z Z, Liu Q C. ISODF-ENN: Imbalanced data mixed sampling method based on improved diffusion model and ENN[J]. J Intell & Fuzzy Syst, 2024, 46(1): 221-235.DOI: 10.3233/JIFS-233886.
[16] Qian J,Peng J,Wu Y Y, et al.MACO-SMOTE: A multi-adaptive center oversampling technique for imbalanced data[J].Int J Approx Reason,2026,193109659-109659.DOI:10.1016/J.IJAR.2026.109659.
[17] Xie W,Huang X.Oversampling algorithm based on improved K-Means and Gaussian distribution[J].Information,2026,17(1):28-28.DOI:10.3390/INFO17010028.
[18] Chawla N V, Bowyer K W, Hall L O, et al. SMOTE: Synthetic minority over-sampling technique[J].J A I R, 2002, 16:321-357.DOI: 10.1613/jair.953.
[19] He H B, Bai Y, Garcia A, et al. ADASYN: Adaptive synthetic sampling approach for imbalanced learning[C]. 2008 IEEE International Joint Conference on Neural Networks, 2008:1322-1328.DOI: 10.1109/IJCNN.2008.4633969.
[20] Han H, Wang W Y, Mao B H. Borderline-SMOTE: A new over-sampling method in imbalanced data sets learning[C] //Internattonal Conference on Intelligent Computing Berlin, Heidelberg: Springer Berlin Heidelberg,2005:878-887.
[21] Zhang S C. Cost-sensitive KNN classification[J]. Neurocomputing, 2020,391: 234-242.DOI: 10.1016/j.neucom.2018.11.101.
[22] Passos L A, Jodas D S, Ribeiro L C, et al. Handling imbalanced datasets through optimum-path forest[J]. Know Based Syst, 2022,242:108445.DOI: 10.1016/j.knosys.2022.108445.
[23] 张晓鹏, 秦亮曦. 一种不平衡数据多策略处理及组合分类算法[J]. 计算机应用与软件, 2024, 41(4): 242-250,305. DOI: 10.3969/j.issn.1000-386x.2024.04.037.
[24] 白琳,俱通,王浩,等.面向不平衡数据的提升均衡集成学习算法[J].山东大学学报(工学版),2024,54(4):59-66.DOI: 10.6040/j.issn.1672-3961.0.2023.116.
[25] 陈丽芳,白云,施永辉,等. 面向不平衡数据的特征子空间增强的异质集成学习[J]. 计算机工程与科学,2025,47(5):940-950. DOI:10.3969/j.issn.1007-130X.2025.05.018.
[26] Pepsi B B M,Kumar S N.Block based ensemble learning on imbalance data stream with concept drift using enhanced particle swarm optimization[J].Evolving Systems,2026,17(2):51-51.DOI:10.1007/S12530-026-09816-Y.
[27] Wang L,Sun N Y,Hu S Q, et al.Kernel-space oversampling and adaptive ensemble learning for robust imbalanced data classification[J].Eng Res Express,2026,8(1):015229-015229.DOI:10.1088/2631-8695/AE32E1. (