数据挖掘实验(七)Matlab实现聚类算法【clusterdata / kmeans】

人工智能110

本文代码均已在 MATLAB R2019b 测试通过,如有错误,欢迎指正。

另外,这次实验都是调用Matlab现成的函数,没什么技术含量。

(一)聚类分析的原理

聚类是将数据分类到不同的类或者簇这样的一个过程,所以同一个簇中的对象有很大的相似性,而不同簇间的对象有很大的相异性。

[En]

Clustering is a process of classifying data into different classes or clusters, so the objects in the same cluster are very similar, while the objects in different clusters are very different.

聚类分析是一种探索性的分析,在分类的过程中,人们不必事先给出一个分类的标准,聚类分析能够从样本数据出发,自动进行分类。聚类分析所使用方法的不同,常常会得到不同的结论。不同研究者对于同一组数据进行聚类分析,所得到的聚类数未必一致。

[En]

Cluster analysis is a kind of exploratory analysis, in the process of classification, people do not have to give a classification standard in advance, cluster analysis can start from the sample data and classify automatically. Different methods used in cluster analysis often lead to different conclusions. Different researchers do cluster analysis for the same group of data, the number of clusters may not be the same.

从实际应用的角度看,聚类分析是数据挖掘的主要任务之一。而且聚类能够作为一个独立的工具获得数据的分布状况,观察每一簇数据的特征,集中对特定的聚簇集合作进一步地分析。聚类分析还可以作为其他算法(如分类和定性归纳算法)的预处理步骤。

[En]

From the perspective of practical application, clustering analysis is one of the main tasks of data mining. And clustering can be used as an independent tool to obtain the distribution of data, observe the characteristics of each cluster, and focus on the cooperation of specific clusters for further analysis. Clustering analysis can also be used as a preprocessing step for other algorithms, such as classification and qualitative induction algorithms.

(二)matlab中聚类的实现算法

方法一:直接聚类,利用clusterdata函数对样本数据进行一次聚类,其缺点为可供用户选择的面较窄,不能更改距离的计算方法,该方法的使用者无需了解聚类的原理和过程,但是聚类效果受限制。

方法二:层次聚类,该方法较为灵活,需要按步骤实现聚类过程,具体需要进行如下过程处理:

[En]

Method 2: hierarchical clustering, this method is flexible and needs to implement the clustering process step by step, which needs to be handled as follows:

(1)计算数据集合中样本两两之间的相似性,用pdist函数计算样本之间的距离;
(2)用linkage函数定义类间距离;
(3)用cluster函数创建聚类。

方法三:划分聚类,包括K均值聚类和K中心聚类,同样需要系列步骤完成该过程,要求使用者对聚类原理和过程有较清晰的认识。

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长

相关文章
人工智能

嵌入式习题1

S3C2410有272个引脚,其信号可以分成: 填空 1 、 填空 2 、 填空 3 、 填空 4 、nGC线、OM线、还有I2C和SPI总线的接出引脚等。 正确答案: 填空 1:地址线 填空 2:数...
人工智能

基于片内Flash的提示音播放程序

目录 一、使用DAC输出周期2khz的正弦波 * 1、获取正弦信号 2、获取数据 3、得到对应的C语言文件 二、使用DAC输出数字音频歌曲数据转换为模拟音频波形输出 三、总结 四、参考链接 一、使用D...
人工智能

知识图谱的应用领域

1.3 知识图谱的价值 知识图谱最早的应用是提升搜索引擎的能力。随后,知识图谱在辅助智能问答、自然语言理解、大数据分析、推荐计算、物联网设备互联、可解释性人工智能等多个方面展现出丰富的应用价值。 1....
人工智能

【OpenCV】 级联分类器训练模型

目录 一:OpenCV级联分类器概念 二:OpenCV级联分类器操作步骤 三:样本采集工作原理分析一 四:样本采集工作原理分析二 五:创建自己的级联分类器 5.1 创建自己的级联分类器第一步 5.2 ...