【发布时间】:2012-06-02 06:13:06
【问题描述】:
我必须实现 DBSCAN 算法。 假设从这个伪代码开始
DBSCAN(D, eps, MinPts)
C = 0
for each unvisited point P in dataset D
mark P as visited
NeighborPts = regionQuery(P, eps)
if sizeof(NeighborPts) < MinPts
mark P as NOISE
else
C = next cluster
expandCluster(P, NeighborPts, C, eps, MinPts)
expandCluster(P, NeighborPts, C, eps, MinPts)
add P to cluster C
for each point P' in NeighborPts
if P' is not visited
mark P' as visited
NeighborPts' = regionQuery(P', eps)
if sizeof(NeighborPts') >= MinPts
NeighborPts = NeighborPts joined with NeighborPts'
if P' is not yet member of any cluster
add P' to cluster C
regionQuery(P, eps)
return all points within P's eps-neighborhood
我的代码必须在具有 Ubuntu Linux 64 位的 Amazon EC2 实例上运行。
regionQuery 函数查询 MongoDB 数据库以获取 P 的 eps-neighborhood 内的所有点。
那么,根据您的说法,实现它以提高性能的最佳编程语言是什么? C、PHP、Java(我不认为)?
【问题讨论】:
-
只是好奇;
C = next cluster是如何实现的?某处是否有未提及的集群列表? -
请注意,DBSCAN 拼写正确,DBSCAN 是缩写。例如 N 代表噪声。
标签: mongodb cluster-analysis dbscan