gpu-DBSCAN

https://pypi.org/project/cuml/

sudo apt install libopenblas-base libomp-dev

# cuda 9.2
pip install cuml-cuda92

# cuda 10.0
pip install cuml-cuda100

import cudf
from cuml import DBSCAN

# Create and populate a GPU DataFrame
gdf_float = cudf.DataFrame()
gdf_float['0'] = [1.0, 2.0, 5.0]
gdf_float['1'] = [4.0, 2.0, 1.0]
gdf_float['2'] = [4.0, 2.0, 1.0]

# Setup and fit clusters
dbscan_float = DBSCAN(eps=1.0, min_samples=1)
dbscan_float.fit(gdf_float)

print(dbscan_float.labels_)

 

 

https://pypi.org/project/ImageAlgoKD/

# if want to use opencl backend
pip install pyopencl
# if want to use CUDA backend
pip install pycuda

pip install ImageAlgoKD

from ImageAlgoKD import *
#Declare an instance of ImageAlgoKD with your algorithm parameters. Then give it the input data points.

ia = ImageAlgoKD(MAXDISTANCE=20, KERNEL_R=1.0)
ia.setInputsPoints(Points(np.genfromtxt("../data/basic.csv",delimiter=',')))
#Then run the clustering over input data points.

ia.run("numpy")
# ia.run("opencl") or ia.run("cuda") if want run in parallel
#In the end, the clustering result can be access by
ia.points.clusterID

 

 

https://github.com/a0165897/dbscan-cuda

https://github.com/Labmem009/DBSCAN_CUDA

Design and optimization of DBSCAN Algorithm based on CUDA

https://github.com/Maghoumi/cudbscan

 

http://m.kokojia.com/article/39577.html

GPU 上带 Rapids 的 DBSCAN

现在,让我们用 Rapids 进行加速!

首先,我们将把数据转换为 pandas.DataFrame 并使用它创建一个 cudf.DataFrame。pandas.DataFrame 无缝转换成 cudf.DataFrame,数据格式无任何更改。

  1. import pandas as pd  
  2. import cudf  
  3. X_df = pd.DataFrame({'fea%d'%i: X[:, i] for i in range(X.shape[1])})  
  4. X_gpu = cudf.DataFrame.from_pandas(X_df) 

然后我们将从 cuML 导入并初始化一个特殊版本的 DBSCAN,它是 GPU 加速的版本。DBSCAN 的 cuML 版本的函数格式与 Scikit-Learn 的函数格式完全相同:相同的参数、相同的样式、相同的函数。

  1. from cuml import DBSCAN as cumlDBSCAN  
  2. db_gpu = cumlDBSCAN(eps=0.6, min_samples=2) 

最后,我们可以在测量运行时间的同时运行 GPU DBSCAN 的预测函数。

  1. %%time  
  2. y_db_gpu = db_gpu.fit_predict(X_gpu) 

GPU 版本的运行时间为 4.22 秒,几乎加速了 2 倍。由于我们使用的是相同的算法,因此结果图也与 CPU 版本完全相同。

https://www.jiqizhixin.com/graph/technologies/2285105b-9612-4c58-88c6-61b09dc8e54d?clicktime=1577911920&enterid=1577911920&from=timeline&isappinstalled=0

 

 

 

https://github.com/SubjectNoi/DBSCAN_CUDA

https://github.com/recke-a/immunodbscan 一个基于CUDA的程序,使用DBSCAN可以快速克隆B和T细胞免疫库

 

https://github.com/ghoulsblade/CudaDBClustering/tree/master/src

https://github.com/h2oai/h2o4gpu/issues/239

1、CUDA-DClust: http://www.dbs.ifi.lmu.de/Publikationen/Boehm/CIKM_09.pdf. It uses a collision matrix approach to name clusters. also has an index data structure on GPU that helps reduce computational complexity of eps-neighborhood detection.

2、G-DBSCAN: https://pdfs.semanticscholar.org/31df/abb8d1085ac468b60a83d32af2a558407c95.pdf. Simpler implementation. Generates a proximity graph out of the eps-neighborhood info and then performs BFS traversal to name the clusters. Thus exposing more parallelism than the previous approach.

https://cameleonx.com/blog/portfolio-items/g-dbscan-of-superpixels/

https://cameleonx.com/blog/portfolio-items

https://cameleonx.com/blog/

https://github.com/ca1773130n/SLIC-DBSCAN-CUDA

https://github.com/ca1773130n/SLIC-DBSCAN-CUDA/tree/9840066a02cc6403bd234f390946bb3c79e71166

#define CAM_WIDTH 480
#define CAM_HEIGHT 360
#define NUM_SPIXELS 1200

https://pypi.org/project/cuml/

http://github.strcpy.cn/rapidsai/cuml/issues/1238

 

https://towardsdatascience.com/heres-how-you-can-accelerate-your-data-science-on-gpu-4ecf99db3430

https://www.chainnews.com/articles/904054826642.htm

https://rapids.ai/community.html

https://devblogs.nvidia.com/gpu-accelerated-analytics-rapids/

 

https://ibmsoe.github.io/snap-ml-doc/v1.5.0/

https://ibmsoe.github.io/snap-ml-doc/dbscandoc.html

 

(K-DBSCAN) (V-DBSCAN)

https://github.com/plasavall/kdbscan_vdbscan

 

https://github.com/pmarcol/dbscan_tf

https://github.com/jklen/PytExamples

https://stackoverflow.com/questions/49934606/how-to-implement-dbscan-clustering-in-tensorflow

 

https://github.com/karthikv2k/gpu_dbscan

 

https://github.com/kwende/DBScanGPU

 

https://github.com/magicfisk/gpu-dbscan-toy

 

https://github.com/jrciii/cuda-gpu-dbscan

 

 

 

 

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
### 回答1: 我了解KANN-DBSCAN这个算法,它是一种基于密度的聚类算法,可以帮助将数据集中的样点区分为不同的类别。该法可以在高维数据集中处理噪声和异常值,并且可以自适应地调整聚类的密度阈值,因此非常适用于大规模数据聚类任务。 ### 回答2: KANN-DBscan是一种基于K近邻图和DBSCAN(Density-Based Spatial Clustering of Applications with Noise)算法的聚类方法。它的目标是通过结合K近邻图和DBSCAN的优势来进行高效和准确的聚类。 首先要解释一下K近邻图和DBSCAN算法。K近邻图是一种将数据点连接在一起的图结构,其中每个数据点与其K个最近邻点相连。DBSCAN算法是一种基于密度的聚类算法,它将数据点分为核心点、边界点和噪声点,并根据密度相连的数据点将它们聚类在一起。 KANN-DBscan的核心思想是通过建立K近邻图来存储数据点之间的距离关系,并利用这个图来加速DBSCAN算法的聚类过程。具体而言,KANN-DBscan首先根据给定的距离阈值构建K近邻图,然后根据图的连接关系确定核心点、边界点和噪声点。接下来,它通过利用图的连接关系和DBSCAN的聚类算法来进行聚类。 相比于传统的DBSCAN算法,KANN-DBscan具有以下优势。首先,K近邻图的建立可以大大减少计算密度的开销,从而提高聚类的效率。同时,KANN-DBscan还可以解决传统DBSCAN算法中距离阈值的选择问题,通过自适应地确定距离阈值来提高聚类结果的准确性。 总结来说,KANN-DBscan是一种结合了K近邻图和DBSCAN的聚类方法,它通过K近邻图的建立和DBSCAN聚类算法的优势来提高聚类的效率和准确性。这种方法在处理大规模数据集时具有较好的性能,有助于发现数据集中的分组模式和噪声点。 ### 回答3: KANN-DBSCAN是基于K-近邻查询和密度聚类的一种改进算法。KANN-DBSCAN算法的主要目标是在高维数据集中有效地发现聚类,并解决传统DBSCAN算法在高维数据集上的性能问题。 KANN-DBSCAN通过使用K-近邻查询来解决传统DBSCAN算法在高维数据集上计算距离矩阵的问题。K-近邻查询是一种通过计算给定数据点附近的最近邻来寻找k个最近邻的方法。通过使用K-近邻查询,KANN-DBSCAN可以快速找到每个数据点附近的k个最近邻,避免了计算距离矩阵的复杂度。 另外,KANN-DBSCAN还引入了一个新的密度计算方法,称为c-近邻。c-近邻是指距离某个数据点不超过一定阈值的其他数据点的数量。利用c-近邻来替代传统DBSCAN算法中的密度定义,可以更好地适应高维数据集的特点。 KANN-DBSCAN算法的步骤如下: 1. 使用K-近邻查询找到每个数据点的k个最近邻。 2. 基于c-近邻计算每个数据点的密度,并将密度大于一定阈值的数据点标记为核心点。 3. 通过连接核心点之间的边来构建聚类。如果两个核心点的c-近邻有重叠,则它们属于同一个聚类。 4. 将非核心点分配给与其c-近邻中的核心点所在聚类相同的聚类。 5. 去除小于一定规模的聚类,并标记为噪声点。 总之,KANN-DBSCAN是一种通过使用K-近邻查询和c-近邻密度计算的改进DBSCAN算法,可以在高维数据集中更有效地发现聚类,并解决传统算法的性能问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值