pylibcugraph.katz_centrality#
- pylibcugraph.katz_centrality(ResourceHandle resource_handle, _GPUGraph graph, betas, double alpha, double beta, double epsilon, size_t max_iterations, bool_t do_expensive_check)[source]#
Compute the Katz centrality for the nodes of the graph. This implementation is based on a relaxed version of Katz defined by Foster with a reduced computational complexity of O(n+m)
- Parameters:
- resource_handleResourceHandle
Handle to the underlying device resources needed for referencing data and running algorithms.
- graphSGGraph or MGGraph
The input graph, for either Single or Multi-GPU operations.
- betasdevice array type
Device array containing the values to be added to each vertex’s new Katz Centrality score in every iteration. If set to None then beta is used for all vertices.
- alphadouble
The attenuation factor, should be smaller than the inverse of the maximum eigenvalue of the graph
- betadouble
Constant value to be added to each vertex’s new Katz Centrality score in every iteration. Relevant only when betas is None
- epsilondouble
Error tolerance to check convergence
- max_iterations: size_t
Maximum number of Katz Centrality iterations
- do_expensive_checkbool_t
A flag to run expensive checks for input arguments if True.
- Returns: