登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于hadoop的聚类算法的实现毕业论文

 2022-03-21 08:03  

论文总字数:25634字

摘 要

随着当今社会科技的高速发展,我们身边的世界瞬息万变。数据量的增长既是机遇,也是挑战。随着步入大数据时代,我们需要从这些庞大的数据中进行分析和计算,找出其中有价值的数据,为我们所用,而Hadoop便是一个可以更容易开发和运行处理大规模数据的软件平台。

本文首先介绍了什么是Hadoop分布式计算平台和K-均值聚类算法以及K-均值聚类算法在现实生活中有什么运用,然后介绍了如何基于Hadoop平台,利用Mahout实现了K-均值聚类算法。本文也介绍了我为什么要选择基于Hadoop的聚类算法的实现作为的我毕业设计课题,然后介绍了Hadoop在国内外的发展现状,介绍了K-均值聚类算法的主要思想和是如何实现的,Hadoop下MapReduce函数的基本原理和实现的方法,和Map函数和Reduce函数的实现方法。Map函数计算每个记录到每个聚类中心的欧式距离,然后将每个记录重新划分到距离其最近的聚类中心。Reduce函数根据Map函数得到的中间结果计算出新的聚类中心,并将新的聚类中心提供给下一次MapReduce任务使用。此过程将一直运行直到到达迭代次数或聚类中心的改变量小于既定阈值,最后给出聚类中心以及每个聚类中心所包含的记录。

关键词:Hadoop K-均值聚类算法 Mahout

Implementation of clustering algorithm based on Hadoop

Abstract

随着当今社会科技的高速发展,我们身边的世界瞬息万变,我们 周围的信息日益增

With the rapid development of science and technology in today's society, the world around us is changing rapidly. The growth of data volume is both an opportunity and a challenge.As we enter the era of big data, we need to analyze and calculate from the huge data, and find out the valuable data for us, and Hadoop is the one which can more easily develop and run processing software platform for large-scale data.

您输入的可能是:中文

本文首先介绍了什么是Hadoop分布式计算平台和K-均值聚类算法,然后介绍了如何基于Hadoop平台,利用Mahout实现了K-均值聚类算法。

This paper first introduces what is the Hadoop distributed computing platform and K- mean clustering algorithm and what is K- mean clustering algorithm use for in real life, and then introduces how to use Mahout to achieve the K- mean clustering algorithm based on the Hadoop platform.This paper also introduces why I want to choose the Hadoop based clustering algorithm to achieve as my graduation project,And then introduces the development of Hadoop at home and abroad,introduces the main ideas and how to realize the K- mean clustering algorithm, and the basic principle and method of MapReduce function under Hadoop,And the realization method of Map function and Reduce function.Map function calculates the Euclidean distance of each record to each cluster center,each record is then re divided into its nearest cluster center. The Reduce function calculates the new cluster center according to the intermediate results obtained by the Map function,And the new cluster center is provided to the next MapReduce task.This process will run until the amount of change in the number of iterations or clustering centers is smaller than the set threshold value,At the end of the cluster center and the records contained in each cluster center are given.

Key Words: Hadoop; K-means; Mahout

目录

摘 要 I

Abstract II

目录 III

第一章 绪论 1

1.1 课题的背景及意义 1

1.1.1 数据挖掘简介 2

1.1.2 聚类分析简介 2

1.1.3 基于Hadoop的聚类算法的实现的意义 2

1.2 Hadoop国内外应用现状介绍 2

1.2.1 国外应用 3

1.2.2 国内应用 3

1.3 论文内容安排 4

第二章 Hadoop分布式系统与Mahout介绍 6

2.1 Hadoop分布式系统介绍 6

2.1.1 分布式文件系统HDFS 6

2.1.2 MapReduce并行编程框架介绍 7

2.2 Mahout介绍 8

第三章 K-均值聚类算法的简介 10

3.1 K-均值聚类算法的原理 10

3.2 算法流程 11

3.3 优缺点分析 12

3.3.1 优点 12

3.3.2 缺点 12

3.4 K-均值的实现关键代码 12

第四章 基于Hadoop的MapReduce函数的实现 18

4.1 MapReduce函数基本原理 18

4.1.1 Map函数的设计 18

4.1.2 Reduce函数的设计 18

4.2函数框架流程 19

4.3 函数实现 19

4.3.1 Mapper 19

4.3.2 Reducer 20

第五章 算法的实现及实验结果 22

5.1 实验硬件配置 22

5.2 Hadoop平台的搭建 22

5.2.1 节点网络设置 22

5.2.2 关闭防火墙 22

5.2.3 配置host列表 23

5.2.5 免密钥登录配置 25

5.2.6 配置环境变量hadoop-env.sh 25

5.2.7 配置环境变量yarn-env.sh 26

5.2.8 配置核心组件core-site.xml 26

5.2.9 配置文件系统hdfs-site.xml 27

5.2.10 配置文件系统yarn-site.xml 27

5.2.11 配置计算框架mapred-site.xml 28

5.2.13 将Hadoop复制到从节点 29

5.2.14 配置Hadoop启动的系统环境变量 29

5.2.15 创建数据目录 29

5.2.16 格式化文件系统 29

5.2.17 启动Hadoop 30

5.2.18 用Web UI检查集群是否启动成功 31

5.2.19 运行实例检查集群是否成功 32

5.3 Mahout的搭建 34

5.3.1 安装配置Mahout 34

5.3.2 验证Mahout安装是否正确 34

第六章 基于Hadoop的聚类算法的拓展-Spark 38

总结 41

参考文献 42

致谢 43

第一章 绪论

1.1 课题的背景及意义

随着如今科技的飞快更新,我们的世界也进入了“大数据时代”。对比以前的人们依赖报纸或者广播甚至口耳相传来获得信息,现代社会的人们随时随地拿起手机,打开电脑,点开网页就可以获得信息甚至有些信息还会主动地被推送到我们的手机上。这些信息也是一种数据,所以互联网和手机的普及使得数据更加容易产生,数据的传递也变得更加迅速,这导致我们身边的数据以几何式的倍率在增涨着。根据IDC(International Data Corporation)的数字宇宙 (Digital Universe) 研究报告显示,2006年全球数据总量为0.18ZB (1ZB=1,000EB=1,000,000PB=1,000,000,000TB),2011年增长至1.8ZB,而到2020年,这个数字预计将增长到惊人的40ZB。虽然我们身边的数据以如此惊人的速度在增长着,但是我们身边的这些数据对我们来说并不一定都是有用的,其中只有33%的数据包含着有价值的信息。随着电子设备种类和数量的快速增加,数据的来源也变得更加多种多样,小到纪录运动信息的穿戴设备,大到探寻宇宙起源的巨型射电望远镜,无不在源源不断的产生数据。数据量的增长既是机遇,也是挑战。我们拥有海量的,多的处理不完的数据,而这也为存储和分析这些数据,挖掘其中的有用信息的方法提出了一个难以达到的要求。随着大数据时代的来临,我们需要从这些庞大的数据中进行分析和计算,找出其中有价值的数据,为我们所用。

请支付后下载全文,论文总字数:25634字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图