连通子图个数leetcode-cugraph:cuGraph-RAPIDS图形分析库

  • J0_542727
    了解作者
  • 12.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-03 11:02
    上传日期
连通子图个数cuGraph - GPU 图形分析 cuGraph 库是 GPU 加速图算法的集合,用于处理 . cuGraph 的愿景是让图分析无处不在,让用户只从分析的角度思考,而不是技术或框架。 为了实现这一愿景,cuGraph 在 Python 层在 GPU 数据帧上运行,从而允许在 .NET 中的 ETL 任务和机器学习任务之间无缝传递数据。 熟悉 Python 的数据科学家将很快了解 cuGraph 如何与 cuDF 的类似 Pandas 的 API 集成。 同样,熟悉 NetworkX 的用户将很快识别出 cuGraph 中提供的类似 NetworkX 的 API,其目标是允许以最少的努力将现有代码移植到 RAPIDS 中。 对于熟悉 C++/CUDA 和图形结构的用户,还提供了 C++ API。 但是,C++ 层的类型和结构检查较少。 有关更多项目详细信息,请参阅 。 注意:对于最新的稳定版,请确保您在最新的分支上。 例如,以下 Python 代码段加载图形数据并计算 PageRank: import cugraph # read data into a cuDF Dat
cugraph-branch-21.08.zip
内容介绍
# <div align="left">&nbsp;cuGraph - GPU Graph Analytics</div> [![Build Status](https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cugraph/job/branches/job/cugraph-branch-pipeline/badge/icon)](https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cugraph/job/branches/job/cugraph-branch-pipeline/) The [RAPIDS](https://rapids.ai) cuGraph library is a collection of GPU accelerated graph algorithms that process data found in [GPU DataFrames](https://github.com/rapidsai/cudf). The vision of cuGraph is _to make graph analysis ubiquitous to the point that users just think in terms of analysis and not technologies or frameworks_. To realize that vision, cuGraph operates, at the Python layer, on GPU DataFrames, thereby allowing for seamless passing of data between ETL tasks in [cuDF](https://github.com/rapidsai/cudf) and machine learning tasks in [cuML](https://github.com/rapidsai/cuml). Data scientists familiar with Python will quickly pick up how cuGraph integrates with the Pandas-like API of cuDF. Likewise, users familiar with NetworkX will quickly recognize the NetworkX-like API provided in cuGraph, with the goal to allow existing code to be ported with minimal effort into RAPIDS. For users familiar with C++/CUDA and graph structures, a C++ API is also provided. However, there is less type and structure checking at the C++ layer. For more project details, see [rapids.ai](https://rapids.ai/). **NOTE:** For the latest stable [README.md](https://github.com/rapidsai/cugraph/blob/main/README.md) ensure you are on the latest branch. As an example, the following Python snippet loads graph data and computes PageRank: ```python import cugraph # read data into a cuDF DataFrame using read_csv gdf = cudf.read_csv("graph_data.csv", names=["src", "dst"], dtype=["int32", "int32"]) # We now have data as edge pairs # create a Graph using the source (src) and destination (dst) vertex pairs G = cugraph.Graph() G.from_cudf_edgelist(gdf, source='src', destination='dst') # Let's now get the PageRank score of each vertex by calling cugraph.pagerank df_page = cugraph.pagerank(G) # Let's look at the PageRank Score (only do this on small graphs) for i in range(len(df_page)): print("vertex " + str(df_page['vertex'].iloc[i]) + " PageRank is " + str(df_page['pagerank'].iloc[i])) ``` ## Getting cuGraph There are 3 ways to get cuGraph : 1. [Quick start with Docker Repo](#quick) 2. [Conda Installation](#conda) 3. [Build from Source](#source) <br/><br/> --- # Currently Supported Features As of Release 0.18 - including 0.18 nightly ## Supported Algorithms | Category | Algorithm | Scale | Notes | ------------ | -------------------------------------- | ------------ | ------------------- | | Centrality | | | | | | Katz | Multi-GPU | | | | Betweenness Centrality | Single-GPU | | | | Edge Betweenness Centrality | Single-GPU | | | Community | | | | | | EgoNet | Single-GPU | | | | Leiden | Single-GPU | | | | Louvain | Multi-GPU | [C++ README](cpp/src/community/README.md#Louvain) | | | Ensemble Clustering for Graphs | Single-GPU | | | | Spectral-Clustering - Balanced Cut | Single-GPU | | | | Spectral-Clustering - Modularity | Single-GPU | | | | Subgraph Extraction | Single-GPU | | | | Triangle Counting | Single-GPU | | | | K-Truss | Single-GPU | | | Components | | | | | | Weakly Connected Components | Single-GPU | | | | Strongly Connected Components | Single-GPU | | | Core | | | | | | K-Core | Single-GPU | | | | Core Number | Single-GPU | | | Layout | | | | | | Force Atlas 2 | Single-GPU | | | Linear Assignment| | | | | | Hungarian | Single-GPU | [README](cpp/src/linear_assignment/README-hungarian.md) | | Link Analysis| | | | | | Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Pagerank) | | | Personal Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Personalized-Pagerank) | | | HITS | Single-GPU | leverages Gunrock | | Link Prediction | | | | | | Jaccard Similarity | Single-GPU | | | | Weighted Jaccard Similarity | Single-GPU | | | | Overlap Similarity | Single-GPU | | | Traversal | | | | | | Breadth First Search (BFS) | Multi-GPU | with cutoff support <br/> [C++ README](cpp/src/traversal/README.md#BFS) | | | Single Source Shortest Path (SSSP) | Multi-GPU | [C++ README](cpp/src/traversal/README.md#SSSP) | | | Traveling Salesperson Problem (TSP) | Single-GPU | | | Sampling | Random Walks (RW) | Single-GPU | | | Structure | | | | | | Renumbering | Single-GPU | multiple columns, any data type | | | Symmetrize | Multi-GPU | | | Other | | | | | | Minimum Spanning Tree | Single-GPU | | | | Maximum Spanning Tree | Single-GPU | | | | | </br></br> ## Supported Graph | Type | Description | | --------------- | --------------------------------------------------- | | Graph | An undirected Graph | | DiGraph | A Directed Graph | | Multigraph | A Graph with multiple edges between a vertex pair | | MultiDigraph | A Directed Graph with multiple edges between a vertex pair | | | | </br></br> ## Supported Data Types cuGraph supports graph creation with Source and Destination being expressed as: * cuDF DataFrame * Pandas DataFrame cuGraph supports execution of graph algorithms from different graph objects * cuGraph Graph
评论
    相关推荐