ImageVerifierCode 换一换
格式:PDF , 页数:11 ,大小:909.03KB ,
资源ID:10541361      下载积分:10 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.docduoduo.com/d-10541361.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(数据挖掘实验报告.pdf)为本站会员(精品资料)主动上传,道客多多仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知道客多多(发送邮件至docduoduo@163.com或直接QQ联系客服),我们立即给予删除!

数据挖掘实验报告.pdf

1、 哈尔滨工业大学 数据挖掘理论与算法实验报告 (2015年度 秋 季学期 ) 课程编码 S1300019C 授课教师 邹兆年 学生姓名 谢浩哲 学 号 15S103172 学 院 计算机科学与技术 学院 哈尔滨工业大学 Page 1 of 10 Designed by 谢浩哲 NOTE: 本报告 所涉及的全部代码均已在 GitHub 上开源 : https:/ 一、 实验 内容 NOTE: 各 算法的实现思想将在下一节阐述 . 1. K-Means K-means clustering is a method of vector quantization, originally from si

2、gnal processing, that is popular for cluster analysis in data mining. k-means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. 2. AGNES (层次 聚类 ) AGNES, known as Agglomerative Hie

3、rarchical clustering. This algorithm works by grouping the data one by one on the basis of the nearest distance measure of all the pairwise distance between the data point. Again distance between the data point is recalculated but which distance to consider when the groups has been formed? For this

4、there are many available methods. Some of them are: - Single-nearest distance or single linkage - Complete-farthest distance or complete linkage - Average-average distance or average linkage - Centroid distance - Wards method - sum of squared Euclidean distance is minimized 3. DBSCAN Density-based s

5、patial clustering of applications with noise (DBSCAN) is a data clustering algorithm. It is a density-based clustering algorithm: given a set of points in some space, it groups together points that are closely packed together (points with many nearby neighbors), marking as outliers points that lie a

6、lone in low-density regions (whose nearest neighbors are too far away). DBSCAN is one of the most common clustering algorithms and also most cited in scientific literature. 二、 实验设计 1. K-Means 算法 思想 : 任意选取点集 中的 k 个 点 作为 中心 , 对 每一个点与 k 个中心进行对比 , 划分 至以这 k 个中心为中心 点 的簇中 . 划分 结束后 , 重新 计算每一个簇的中心点 . 重复 以上过程

7、 , 直至 这些中心点不再变化 . 哈尔滨工业大学 Page 2 of 10 Designed by 谢浩哲 程序 流程图 : 核心 代码 : 1 public class KMeans 2 public Cluster getClusters(int k, Point points) 3 if ( k = points.length ) 4 return null; 5 6 7 Cluster clusters = getInitialClusters(k, points); 8 Cluster newClusters = null; 9 do 10 newClusters = getClu

8、sters(k, points, clusters); 11 12 if (isClustersTheSame(clusters, newClusters) 13 break; 哈尔滨工业大学 Page 3 of 10 Designed by 谢浩哲 14 15 clusters = newClusters; 16 while (true); 17 return clusters; 18 19 20 private Cluster getClusters(int k, Point points, Cluster cluster) 21 for ( int i = 0; i clusters)

9、3 while ( clusters.size() 1 ) 4 double minProximity = Double.MAX_VALUE; 5 int minProximityIndex1 = 0, minProximityIndex2 = 0; 6 7 for ( int i = 0; i getClusters(List points, int minPoints, double eps) 3 List corePoints = getCorePoints( points, minPoints, eps); 4 Map clusters = getClustersOfCorePoint

10、s(corePoints, eps); 5 6 List borderPoints = getBorderPoints(points, corePoints, minPoints, eps); 7 getClustersOfBorderPoints( corePoints, borderPoints, clusters, eps); 8 哈尔滨工业大学 Page 7 of 10 Designed by 谢浩哲 9 return new ArrayList(clusters.values(); 10 11 12 private List getCorePoints(List points, in

11、t minPoints, double eps) 13 List corePoints = new ArrayList(); 14 15 for ( int i = 0; i = minPoints ) 25 currentPoint.pointType = PointType.CorePoint; 26 corePoints.add(currentPoint); 27 28 29 return corePoints; 30 31 32 private Map getClustersOfCorePoints( List corePoints, double eps) 33 Map cluste

12、rs = new HashMap(); 34 35 for ( int i = 0; i corePoints.size(); + i ) 36 Point currentPoint = corePoints.get(i); 37 Point representPoint = null; 38 for ( int j = 0; j i; + j ) 39 Point anotherPoint = corePoints.get(j); 40 if ( currentPoint.isPointsInEpsCircle( anotherPoint, eps) ) 41 representPoint

13、= anotherPoint.representPoint; 42 currentPoint.representPoint = representPoint; 43 break; 44 45 46 if ( representPoint = null ) 哈尔滨工业大学 Page 8 of 10 Designed by 谢浩哲 47 currentPoint.representPoint = currentPoint; 48 clusters.put(currentPoint, new Cluster(currentPoint); 49 else 50 Cluster cluster = cl

14、usters.get(representPoint); 51 cluster.points.add(currentPoint); 52 53 54 return clusters; 55 56 三、 测试数据 1. K-Means 对于 K-Means, 程序 随机生成 均匀 分布的 二维坐标数据 , 其中 横纵坐标均在 0, 100范围 内 . 运行参数 : 坐标点 的个数 : n = 200 预期 的聚类数量 : k = 5 数据 样例 : 请参见 附件中的 KMeans/Runtime/input.txt 查看 具体 数据 . (16.38, 7.41), (39.14, 10.49),

15、 (66.43, 38.65), (44.11, 51.71), (66.99, 6.14), 2. AGNES (层次 聚类 ) 对于 AGNES, 程序 随机生成 k 个 圆形 簇的 二维坐标数据 . 对于每一个 簇 , 程序 随机生成 簇 的中心 以及小于 等于 24 的 半径 r. 对于 每一个簇 , 其中 点的数量被控制在 0, r2 + 64. 运行 参数 : 聚类 的 数量 : k = 2 数据 样例 : 请参见 附件中的 AGNES/Runtime/input.txt 查看具体 数据 . (16.38, 7.41), (39.14, 10.49), (66.43, 38.65)

16、, (44.11, 51.71), (66.99, 6.14), 3. DBSCAN 对于 DBSCAN, 程序 随机生成 k 个 圆形 簇的 二维坐标数据 . 对于每一个 簇 , 程序 随机生成 簇的 中心 以及小于 等于 24 的 半径 r. 对于 每一个簇 , 其中 点的数量被控制在 0, r2 + 64. 运行 参数 : 聚类 的 数量 : k = 3 被 认定为 CorePoint 周围 点的数量 : minPt = 5 被 认定为 CorePoint 搜索周围 点 的 半径 : Eps = 4 请参见 附件中的 DBSCAN/Runtime/input.txt 查看具体 数据 .

17、(16.38, 7.41), (39.14, 10.49), (66.43, 38.65), (44.11, 51.71), (66.99, 6.14), 哈尔滨工业大学 Page 9 of 10 Designed by 谢浩哲 四、 实验结果 1. K-Means 运行 参数 : n = 200, k = 5 2. AGNES (层次 聚类 ) 运行 参数 : k = 2 哈尔滨工业大学 Page 10 of 10 Designed by 谢浩哲 3. DBSCAN 运行 参数 : k = 3, minPt = 5, Eps = 4 NOTE: 图中 绿色点为 Core Point, 蓝色

18、点为 Border Point, 红色点 为 Noise Point. 五、 遇到的困难及解决方法、心得体会 K-Means 算法主要来说比较简单 . AGNES 算法 本身并不复杂 , 但 做可视化时的确用了很长的时间 , 现在 的解决方案是 , 每一秒 都将图中的一个类分裂成 2个 类 (感觉像 Bisecting K-Means), 以 展示 “ 层次 ” 聚类的过程 . DBSCAN 就 更复杂一些 , 并且 要在 时间 和空间 上找到 一个平衡点并非易事 . 一种占用 较大空间的解法是 , 对于 每一个点 , 程序 扫描其周围的点 , 并 将它们加入列表 (每个 点都 各自 维护一个 列表 ). 可以 想见 , 这样 的 空间 消耗 较大 . 现有 的实现方案是 , 先 扫描识别出Core Point, 根据 Core Point 找出周围的 Border Point, 剩下 的即为 Noise Point. 但是 这样需要有 2 次 扫描 , 时间复杂度 不如前者 . 总的 来说 , 这些实验让我 较好的了解 聚类算法 , 对于 不同算法的利弊也有了 更深刻 的认识 .

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报