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

 

 

 

 

参考资源链接:[GPU加速机器学习:cuML库详解](https://wenku.csdn.net/doc/7fq59xkh3q?utm_source=wenku_answer2doc_content) cuML实现的DBSCAN算法通过GPU并行处理能力显著提升了性能。首先,我们需要了解DBSCAN算法,它是一种基于密度的空间聚类算法,用于发现数据中的密集区域。在传统的CPU实现中,DBSCAN的时间复杂度较高,特别是在处理大型数据集时,其计算成本可能变得不可接受。cuML利用GPU的并行计算特性,能够同时处理成千上万的数据点,从而显著加快了计算速度。 相较于scikit-learn中的DBSCAN实现,cuML版本的DBSCAN算法具有以下几个优势: - **并行处理能力**:cuML能够充分利用GPU的多核心并行处理优势,而scikit-learn是基于CPU的单核心处理,这导致cuML在执行大规模数据集的DBSCAN聚类时速度更快。 - **内存效率**:在GPU上运行DBSCAN算法时,由于其内存访问模式更加优化,cuML能够更好地利用GPU的内存带宽,减少了内存的重复访问和等待时间。 - **扩展性**:cuML的DBSCAN算法扩展性更好,可以处理比CPU版本更大的数据集。 当使用cuML进行DBSCAN聚类时,需要注意的是,它依赖于RAPIDS提供的cuDF库来管理数据,这需要数据先被转换成cuDF DataFrame格式。此外,cuML的DBSCAN参数与scikit-learn略有不同,其中主要包括了最小点数(min_samples)、邻域半径(eps)以及距离度量方式等。 为了更深入地了解cuML中的DBSCAN算法以及与scikit-learn的对比,建议查阅《GPU加速机器学习:cuML库详解》。这本书详细介绍了cuML的安装、配置、算法支持以及性能基准测试,通过实例讲解了如何将机器学习工作负载迁移到GPU上,并充分利用cuML的高性能特性,这对于想要深入挖掘cuML潜力的读者来说是极好的学习资源。 参考资源链接:[GPU加速机器学习:cuML库详解](https://wenku.csdn.net/doc/7fq59xkh3q?utm_source=wenku_answer2doc_content)
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值