博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
dbscan
阅读量:4560 次
发布时间:2019-06-08

本文共 1491 字,大约阅读时间需要 4 分钟。

This is a pseudocode for DBSCAN from "".

And I have tried the pseudocode from the  page. I prefer this.

ExpandCluster(SetOfPoints, Point, ClId, Eps, MinPts) : Boolean;	seeds:=SetOfPoints.regionQuery(Point,Eps);	IF seeds.size
Empty DO currentP := seeds.first(); result := SetOfPoints.regionQuery(currentP, Eps); IF result.size >= MinPts THEN FOR i FROM 1 TO result.size DO resultP := result.get(i); IF resultP.ClId IN {UNCLASSIFIED, NOISE} THEN IF resultP.ClId = UNCLASSIFIED THEN seeds.append(resultP); END IF; SetOfPoints.changeClId(resultP,ClId); END IF; // UNCLASSIFIED or NOISE END FOR; END IF; // result.size >= MinPts seeds.delete(currentP); END WHILE; // seeds <> Empty RETURN True; END IFEND; // ExpandClusterDBSCAN (SetOfPoints, Eps, MinPts)// SetOfPoints is UNCLASSIFIED ClusterId := nextId(NOISE); FOR i FROM 1 TO SetOfPoints.size DO Point := SetOfPoints.get(i); IF Point.ClId = UNCLASSIFIED THEN IF ExpandCluster(SetOfPoints, Point, ClusterId, Eps, MinPts) THEN ClusterId := nextId(ClusterId) END IF END IF END FOREND; // DBSCAN

This can cluster the data based on density(or distance) consider noise, it's no complicated to implement.

I see that the most important thing that to get good result is to get good eps and minpts. and if your data is complicate the distance of two data point have so much influence on the result.

 

Good luck.

转载于:https://www.cnblogs.com/henyihanwobushi/articles/3769739.html

你可能感兴趣的文章
Learning Cpp----Comliling your first program
查看>>
Microsoft.Net框架程序设计学习笔记(5):延迟签名
查看>>
html5特性
查看>>
关于我在安装2.6.9版本bochs虚拟机时遇到的问题以及解决过程
查看>>
Linux系统克隆为iso镜像盘(类似win gost)
查看>>
2017 乌鲁木齐赛区网络赛 J Our Journey of Dalian Ends 费用流
查看>>
Android 修改Activity标题样式 actionBar
查看>>
OpenCV播放视频
查看>>
Android SDK 目录和作用详解
查看>>
网络流(最大独立点集):POJ 1466 Girls and Boys
查看>>
rest api load test
查看>>
C++之类模板
查看>>
Python下输出int型数据的倒序数
查看>>
[NOI2014]购票 --- 斜率优化 + 树形DP + 数据结构
查看>>
ftp服务器的安装
查看>>
printf 函数中的格式转化字符及其含义
查看>>
POJ-1787 Charlie's Change (完全背包+输出方案)
查看>>
java中子类继承父类时是否继承构造函数
查看>>
Matlab实现单变量线性回归
查看>>
Matlab读入含有特殊分隔符的文件(textread)
查看>>