Skip to content

Commit

Permalink
updating the docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
BradReesWork committed Jun 25, 2024
1 parent 0b1b96f commit c00b963
Show file tree
Hide file tree
Showing 24 changed files with 177 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ python/nx-cugraph/objects.inv

## Doxygen and Docs
cpp/doxygen/html
cpp/doxygen/xml
docs/cugraph/lib*
docs/cugraph/api/*

Expand Down
12 changes: 12 additions & 0 deletions python/cugraph/cugraph/centrality/betweenness_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def betweenness_centrality(
Algorithm (2001) to compute exact or approximate betweenness.
If weights are provided in the edgelist, they will not be used.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
k : int, list or cudf object or None, optional (default=None)
If k is not None, use k node samples to estimate betweenness. Higher
values give better approximation. If k is either a list, a cudf DataFrame,
Expand Down Expand Up @@ -224,6 +230,12 @@ def edge_betweenness_centrality(
The current implementation uses BFS traversals. Use weight parameter
if weights need to be considered (currently not supported).
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
k : int or list or None, optional (default=None)
If k is not None, use k node samples to estimate betweenness. Higher
values give better approximation. If k is either a list, a cudf DataFrame,
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/centrality/degree_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ def degree_centrality(G, normalized=True):
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
normalized : bool, optional, default=True
If True normalize the resulting degree centrality values
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/centrality/eigenvector_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def eigenvector_centrality(G, max_iter=100, tol=1.0e-6):
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
max_iter : int, optional (default=100)
The maximum number of iterations before an answer is returned. This can
be used to limit the execution time and do an early exit before the
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/centrality/katz_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def katz_centrality(
cuGraph graph descriptor with connectivity information. The graph can
contain either directed or undirected edges.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
alpha : float, optional (default=None)
Attenuation factor defaulted to None. If alpha is not specified then
it is internally calculated as 1/(degree_max) where degree_max is the
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/ecg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def ecg(input_graph, min_weight=0.05, ensemble_size=16, weight=None):
and weights. The adjacency list will be computed if not already
present.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
min_weight : float, optional (default=0.5)
The minimum value to assign as an edgeweight in the ECG algorithm.
It should be a value in the range [0,1] usually left as the default
Expand Down
12 changes: 12 additions & 0 deletions python/cugraph/cugraph/community/egonet.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ def ego_graph(G, n, radius=1, center=True, undirected=None, distance=None):
information. Edge weights, if present, should be single or double
precision floating point values.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
n : integer or list, cudf.Series, cudf.DataFrame
A single node as integer or a cudf.DataFrame if nodes are
represented with multiple columns. If a cudf.DataFrame is provided,
Expand Down Expand Up @@ -171,6 +177,12 @@ def batched_ego_graphs(G, seeds, radius=1, center=True, undirected=None, distanc
information. Edge weights, if present, should be single or double
precision floating point values.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
seeds : cudf.Series or list or cudf.DataFrame
Specifies the seeds of the induced egonet subgraphs.
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/induced_subgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def induced_subgraph(
G : cugraph.Graph or networkx.Graph
The current implementation only supports weighted graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
vertices : cudf.Series or cudf.DataFrame
Specifies the vertices of the induced subgraph. For multi-column
vertices, vertices should be provided as a cudf.DataFrame
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/ktruss_subgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ def k_truss(
defined for only undirected graphs as they are defined for
undirected triangle in a graph.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
k : int
The desired k to be used for extracting the k-truss subgraph.
Expand Down
8 changes: 7 additions & 1 deletion python/cugraph/cugraph/community/leiden.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@ def leiden(
Parameters
----------
G : cugraph.Graph
G : cugraph.Graph, networkx.Graph
cuGraph graph descriptor of type Graph
The current implementation only supports undirected weighted graphs.
The adjacency list will be computed if not already present.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
max_iter : integer, optional (default=100)
This controls the maximum number of levels/iterations of the Leiden
algorithm. When specified the algorithm will terminate after no more
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/louvain.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ def louvain(
present.
The current implementation only supports undirected graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
max_level : integer, optional (default=100)
This controls the maximum number of levels of the Louvain
algorithm. When specified the algorithm will terminate after no more
Expand Down
18 changes: 18 additions & 0 deletions python/cugraph/cugraph/community/spectral_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def spectralBalancedCutClustering(
G : cugraph.Graph or networkx.Graph
Graph descriptor
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
num_clusters : integer
Specifies the number of clusters to find, must be greater than 1
Expand Down Expand Up @@ -142,6 +148,12 @@ def spectralModularityMaximizationClustering(
G : cugraph.Graph or networkx.Graph
cuGraph graph descriptor. This graph should have edge weights.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
num_clusters : integer
Specifies the number of clusters to find
Expand Down Expand Up @@ -233,6 +245,12 @@ def analyzeClustering_modularity(
G : cugraph.Graph or networkx.Graph
graph descriptor. This graph should have edge weights.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
n_clusters : integer
Specifies the number of clusters in the given clustering
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/subgraph_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def subgraph(
G : cugraph.Graph or networkx.Graph
The current implementation only supports weighted graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
vertices : cudf.Series or cudf.DataFrame
Specifies the vertices of the induced subgraph. For multi-column
vertices, vertices should be provided as a cudf.DataFrame
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/community/triangle_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ def triangle_count(G, start_list=None):
(edge weights are not used in this algorithm).
The current implementation only supports undirected graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
start_list : list or cudf.Series
list of vertices for triangle count. if None the entire set of vertices
in the graph is processed
Expand Down
18 changes: 18 additions & 0 deletions python/cugraph/cugraph/components/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ def weakly_connected_components(G, directed=None, connection=None, return_labels
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
directed : bool, optional (default=None)
NOTE
Expand Down Expand Up @@ -224,6 +230,12 @@ def strongly_connected_components(
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
directed : bool, optional (default=True)
NOTE
Expand Down Expand Up @@ -330,6 +342,12 @@ def connected_components(G, directed=None, connection="weak", return_labels=None
The adjacency list will be computed if not already present. The number
of vertices should fit into a 32b int.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
directed : bool, optional (default=True)
NOTE
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/cores/core_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def core_number(G, degree_type="bidirectional"):
of the core numbers.
The current implementation only supports undirected graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
degree_type: str, (default="bidirectional")
This option determines if the core number computation should be based
on input, output, or both directed edges, with valid values being
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/cores/k_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def k_core(G, k=None, core_number=None, degree_type="bidirectional"):
weights, they don't participate in the calculation of the k-core.
The current implementation only supports undirected graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
k : int, optional (default=None)
Order of the core. This value must not be negative. If set to None, the
main core is returned.
Expand Down
8 changes: 7 additions & 1 deletion python/cugraph/cugraph/link_analysis/hits.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ def hits(G, max_iter=100, tol=1.0e-5, nstart=None, normalized=True):
Parameters
----------
G : cugraph.Graph
G : cugraph.Graph, networkx.Graph
cuGraph graph descriptor, should contain the connectivity information
as an edge list (edge weights are not used for this algorithm).
The adjacency list will be computed if not already present.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
max_iter : int, optional (default=100)
The maximum number of iterations before an answer is returned.
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/link_analysis/pagerank.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def pagerank(
as an edge list.
The transposed adjacency list will be computed if not already present.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
alpha : float, optional (default=0.85)
The damping factor alpha represents the probability to follow an
outgoing edge, standard value is 0.85.
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/link_prediction/jaccard.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ def jaccard_coefficient(
This implementation only supports undirected, non-multi Graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/link_prediction/overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def overlap_coefficient(
This implementation only supports undirected, non-multi edge Graph.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/link_prediction/sorensen.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ def sorensen_coefficient(
This implementation only supports undirected, non-multi Graphs.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
ebunch : cudf.DataFrame or iterable of node pairs, optional (default=None)
A GPU dataframe consisting of two columns representing pairs of
vertices or iterable of 2-tuples (u, v) where u and v are nodes in
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/sampling/node2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def node2vec(G, start_vertices, max_depth=1, compress_result=True, p=1.0, q=1.0)
The graph can be either directed or undirected.
Weights in the graph are ignored.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
start_vertices: int 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
Expand Down
6 changes: 6 additions & 0 deletions python/cugraph/cugraph/sampling/random_walks.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def random_walks(
G : cuGraph.Graph or networkx.Graph
The graph can be either directed or undirected.
.. deprecated:: 24.08
Accepting ``networkx.Graph`` is deprecated and will be removed in a
future version. For ``networkx.Graph`` use netwotkx directly with
the ``nx-cugraph`` plug-in.
random_walks_type : str, optional (default='uniform')
Type of random walks: 'uniform', 'biased', 'node2vec'.
Only 'uniform' random walks is currently supported
Expand Down

0 comments on commit c00b963

Please sign in to comment.