cugraph.hits#

cugraph.hits(G, max_iter=100, tol=1e-05, nstart=None, normalized=True)[source]#

Compute HITS hubs and authorities values for each vertex

The HITS algorithm computes two numbers for a node. Authorities estimates the node value based on the incoming links. Hubs estimates the node value based on outgoing links.

Both cuGraph and networkx implementation use a 1-norm.

Parameters:
Gcugraph.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.

max_iterint, optional (default=100)

The maximum number of iterations before an answer is returned.

tolfloat, optional (default=1.0e-5)

Set the tolerance the approximation, this parameter should be a small magnitude value.

nstartcudf.Dataframe, optional (default=None)

The initial hubs guess vertices along with their initial hubs guess value

nstart[‘vertex’]cudf.Series

Initial hubs guess vertices

nstart[‘values’]cudf.Series

Initial hubs guess values

normalizedbool, optional (default=True)

A flag to normalize the results

Returns:
HubsAndAuthoritiescudf.DataFrame

GPU data frame containing three cudf.Series of size V: the vertex identifiers and the corresponding hubs values and the corresponding authorities values.

df[‘vertex’]cudf.Series

Contains the vertex identifiers

df[‘hubs’]cudf.Series

Contains the hubs score

df[‘authorities’]cudf.Series

Contains the authorities score

Examples

>>> from cugraph.datasets import karate
>>> G = karate.get_graph(download=True)
>>> hits = cugraph.hits(G, max_iter = 50)