作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2020, Vol. 46 ›› Issue (11): 139-147. doi: 10.19678/j.issn.1000-3428.0055670

• 先进计算与数据处理 • 上一篇    下一篇

基于MapReduce和Spark的大规模压缩模糊K-近邻算法

王谟瀚a, 翟俊海a,b, 齐家兴a   

  1. 河北大学 a. 数学与信息科学学院;b. 河北省机器学习与计算智能重点实验室, 河北 保定 071002
  • 收稿日期:2019-08-05 修回日期:2019-11-10 发布日期:2019-11-20
  • 作者简介:王谟瀚(1992-),男,硕士研究生,主研方向为分布式计算、机器学习;翟俊海(通信作者),教授;齐家兴,硕士。
  • 基金资助:
    国家自然科学基金(71371063);河北省自然科学基金(F2017201026);河北省科技计划重点研发基金(19210310D);河北大学研究生创新项目基金(hbu2019ss077)。

Large-Scale Condensed Fuzzy K-Nearest Neighbor Algorithm Based on MapReduce and Spark

WANG Mohana, ZHAI Junhaia,b, QI Jiaxinga   

  1. a. College of Mathematics and Information Science;b. Hebei Key Laboratory of Machine Learning and Computational Intelligence, Hebei University, Baoding, Hebei 071002, China
  • Received:2019-08-05 Revised:2019-11-10 Published:2019-11-20

摘要: 压缩模糊K-近邻(CFKNN)算法仅适用于中小数据环境,且其样例选择采用静态机制,导致算法不能对阈值进行动态调整从而选出最优样例。为此,对CFKNN算法进行改进,将其扩展到大规模数据环境,提出分别基于MapReduce和Spark的2种大规模压缩模糊K-近邻算法。在样例选择阈值设置方面,引入动态机制,使得所选样例更具代表性。在具有7个数据节点的大数据平台上进行实验,结果表明,与CFKNN算法相比,所提2种算法具有更高的分类精度和加速比。2个平台相比,MapReduce产生的中间文件数目多于Spark,而Spark在运行时间和同步次数上优于MapReduce。

关键词: MapReduce平台, Spark平台, 模糊K-近邻, 样例选择, 动态机制

Abstract: The Condensed Fuzzy K-Nearest Neighbor(CFKNN) algorithm is applicable only to small-sized and medium-sized data sets,and its mechanism of instance selection is static,so the algorithm can not adjust the threshold dynamically to select the optimal sample.To address the problems,this paper improves the CFKNN algorithm to make it applicable it to large-scale data environment,and on this basis proposes two kinds of large-scale condensed fuzzy K-nearest neighbor algorithms based on MapReduce and Spark.A dynamic mechanism is introduced into the setting of the instance selection threshold to make the selected instances more representative.Experiments are carried out on a big data platform with 7 data nodes.The experimental results show that compared with the CFKNN algorithm,the two proposed algorithms have better classification accuracy and acceleration ratio.Results of comparison between the two proposed algorithms show that MapReduce produces more intermediate files than Spark,yet Spark outperforms MapReduce in terms of running time and synchronization times.

Key words: MapReduce platform, Spark platform, fuzzy K-Nearest Neighbor(K-NN), instance selection, dynamic mechanism

中图分类号: