青岛科技大学研究生学位论文
基于遗传算法的k-means聚类挖掘算法的研究
摘 要
数据挖掘是随着信息技术不断发展而形成的一门新学科,是信息处理和数据库技术领域的一个新兴的研究热点。数据挖掘的任务是从海量数据中发现隐含的有用知识,为科学决策提供支持。
聚类分析是数据挖掘的一个非常重要的研究分支。聚类是一种无监督的分类方法,目标是在没有任何先验知识的情况下,将数据集划分成不同的类,使得相同类中的对象尽可能相似,不同类中的对象尽可能相异。k-means算法作为聚类分析中的经典算法现已被广泛应用在商务、市场分析、生物学、文本分类等领域。然而,k-means算法具有对初始值敏感、易陷入局部极小值等缺点。因此,改进 k-means算法以进一步提高聚类效果具有十分重要的意义。
本文首先详细地介绍了聚类分析技术,对现有的聚类算法进行了分类,分析了这些算法的优缺点,并在此基础上,重点研究了k-means算法。
其次,全面分析了数据挖掘中的一个重要算法——遗传算法。在此基础上,结合k-means算法的思想和特点,提出了一种改进的遗传k-means聚类算法,从编码方法、适应度函数的构造、交叉算子和变异算子的设计、k-means优化操作等方面进行了详细的讨论和分析。
最后,为了测试本文提出的聚类算法的性能,本文用k-means算法和改进的算法进行了三组实验,并对两种算法的聚类结果进行比较,实验结果表明本文算法能够有效地解决聚类问题。
关键词:数据挖掘 聚类分析 遗传算法 k-means算法 改进的遗传k-means算法
I
基于遗传算法的k-means聚类挖掘方法研究
RESEARCH OF K-MEANS CLUSTERING IN DATA MINING BASED ON GENETIC ALGORITHM
ABSTRACT
Data mining is a new subject formed with the development of the information technology and is a new research point in the information and database technology. The purpose of data mining is to discovery hidden and useful knowledge from huge amounts of data, which can support the science decision.
Cluster analysis is one of the important themes in data mining. Clustering is a unsupervised classifying method, the goal of clustering is to partition data set into such clusters that objects within a cluster have high similarity in comparison to one another, but are very dissimilar to objects in other clusters without any prior knowledge. As a classical method of clustering analysis, k-means has been widely used in commerce, market analysis, biology, text classification and so on. However k-means has two severe defects—sensitive to initial data and easy to get into a local optimum. On this condition, improving k-means is an effective method to get better clustering result.
Firstly, the dissertation detailedly introduce clustering analysis technology, and most existing clustering algorithms are classified, analysis their advantages and disadvantages. On the basis, the dissertation chooses k-means as research target.
Secondly, analyzing an important method—genetic algorithms in data mining. On this basis, a new clustering method of k-means based on improved genetic algorithm is proposed. The dissertation discussers and analyses the new algorithms in detail from coding method, fitness function, selection operators, crossover operators, mutation operators, k-means operators and other aspects.
Finally, for testing the performance of the proposed algorithms, the dissertation gives three simulation experiments. Simulation results show that comparing with k-means method, the proposed can get a better clustering result.
KEY WORDS:Data mining Cluster analysis Genetic algorithm k-means
IGKA
II
青岛科技大学研究生学位论文
目 录
第一章 绪论 .................................................................................................................................................... 1
1.1课题研究背景与意义........................................................................................ 1
1.1.1数据挖掘概述.......................................................................................... 1 1.1.2数据挖掘中聚类分析.............................................................................. 5 1.1.3遗传算法与数据挖掘.............................................................................. 5 1.2国内外研究现状................................................................................................ 6
1.2.1数据挖掘的研究现状.............................................................................. 6 1.2.2聚类分析研究现状.................................................................................. 6 1.2.3遗传算法研究现状.................................................................................. 6 1.2.4遗传聚类研究现状.................................................................................. 7 1.3本课题主要研究内容........................................................................................ 8 1.4本文章节安排.................................................................................................... 9
第二章 聚类分析..................................................................................................................................... 10
2.1聚类分析的基本概念[30] ................................................................................. 10 2.2数据挖掘对聚类算法的要求.......................................................................... 10 2.3聚类分析中的数据结构和类型.......................................................................11
2.3.1聚类分析中的数据结构.........................................................................11 2.3.2 聚类分析中的数据类型....................................................................... 12 2.4聚类分析中的相似度度量方法...................................................................... 15
2.4.1距离........................................................................................................ 16 2.4.2相似系数................................................................................................ 17 2.5聚类分析中的聚类准则函数[34] ..................................................................... 17 2.6 聚类算法的分类及其典型算法 ..................................................................... 19
2.6.1基于划分的方法.................................................................................... 19 2.6.2基于层次的方法.................................................................................... 20 2.6.3基于密度的方法.................................................................................... 20 2.6.4基于网格的方法.................................................................................... 20 2.6.5基于模型的方法.................................................................................... 21 2.6.6模糊聚类................................................................................................ 21
III
基于遗传算法的k-means聚类挖掘方法研究
2.7聚类分析在数据挖掘中的应用 ......................................................................21 2.8本章小结 ..........................................................................................................22
第三章 遗传算法的基本原理 ......................................................................................................23
3.1遗传算法的历史与发展 ..................................................................................23 3.2遗传算法的基本术语[45] ..................................................................................24 3.3遗传算法的特点[46] ..........................................................................................24 3.4遗传算法的基本要素 ......................................................................................25 3.5遗传算法的描述及流程 ..................................................................................27
3.5.1 遗传算法的描述[47] ...............................................................................27 3.5.2遗传算法的执行过程 ............................................................................28 3.6遗传算法的应用 ..............................................................................................29 3.7本章小结 ..........................................................................................................30
第四章 一种改进的遗传K-MEANS聚类算法 ...........................................................31
4.1 K-MEANS算法的思想与流程 ...........................................................................31
4.1.1 k-means算法思想[49] .............................................................................31 4.1.2 k-means算法流程 ..................................................................................32 4.2 K-MEANS算法的特点 .......................................................................................33 4.3基于K-MEANS的改进聚类算法 ......................................................................34 4.4聚类分析中的遗传算法 ..................................................................................34 4.5改进的遗传K-MEANS算法(IGKA) .................................................................35
4.5.1 IGKA算法流程 .....................................................................................35 4.5.2目标函数 ................................................................................................37 4.5.3编码方法 ................................................................................................38 4.5.4 种群初始化 ...........................................................................................38 4.5.5适应度函数的设计 ................................................................................39 4.5.6选择操作 ................................................................................................39 4.5.7交叉操作 ................................................................................................40 4.5.8变异操作 ................................................................................................41 4.5.9 k-means优化操作(KMO) ......................................................................42 4.5.10算法终止条件 ......................................................................................42 4.6本章小结 ..........................................................................................................42
第五章 实验结果与比较分析 ......................................................................................................43
IV
青岛科技大学研究生学位论文
5.1实验平台.......................................................................................................... 43 5.2 实验结果和分析 ............................................................................................. 43
5.2.1实验一.................................................................................................... 43 5.2.2实验二.................................................................................................... 45 5.2.3实验三.................................................................................................... 47 5.2.4 结果分析............................................................................................... 51 5.3本章小结.......................................................................................................... 52
总结与展望 .................................................................................................................................................... 53 参考文献 .......................................................................................................................................................... 55 致谢 ....................................................................................................................................................................... 58 攻读学位期间发表的学术论文 ................................................ 59
V