cugraph.dask.sampling.random_walks.random_walks#
- cugraph.dask.sampling.random_walks.random_walks(input_graph, random_walks_type='uniform', start_vertices=None, max_depth=None, use_padding=None, legacy_result_type=None)[source]#
compute random walks for each nodes in ‘start_vertices’ and returns a padded result along with the maximum path length. Vertices with no outgoing edges will be padded with -1.
- Parameters:
- input_graphcuGraph.Graph
The graph can be either directed or undirected.
- random_walks_typestr, optional (default=’uniform’)
Type of random walks: ‘uniform’, ‘biased’, ‘node2vec’. Only ‘uniform’ random walks is currently supported
- start_verticesint or list or cudf.Series or cudf.DataFrame
A single node or a list or a cudf.Series of nodes from which to run the random walks. In case of multi-column vertices it should be a cudf.DataFrame
- max_depthint
The maximum depth of the random walks
- use_paddingbool
This parameter is here for SG compatibility and ignored
- legacy_result_typebool
This parameter is here for SG compatibility and ignored
- Returns:
- vertex_pathsdask_cudf.Series or dask_cudf.DataFrame
Series containing the vertices of edges/paths in the random walk.
- edge_weight_paths: dask_cudf.Series
Series containing the edge weights of edges represented by the returned vertex_paths
- max_path_lengthint
The maximum path length