我必须实现 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(我不认为)?