pylibhipgraph.all_pairs_sorensen_coefficients#
2025-05-20
2 min read time
all_pairs_sorensen_coefficients (ResourceHandle resource_handle, _GPUGraph graph, vertices, bool_t use_weight, topk, bool_t do_expensive_check)
Perform All-Pairs Sorensen similarity computation.
Note
Sorensen similarity must run on a symmetric graph.
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.
- verticescudf.Series or None
- Vertex list to compute all-pairs. If None, then compute based
on all vertices in the graph.
- use_weightbool, optional
If set to True, then compute the weighted sorensen_coefficients (the input graph must be weighted in that case). Otherwise, compute the non-weighted sorensen_coefficients.
- topksize_t
Specify the number of answers to return otherwise will return all values.
- do_expensive_checkbool
If True, performs more extensive tests on the inputs to ensure validitity, at the expense of increased run time.
Returns#
A tuple of device arrays containing the vertex pairs with their corresponding Sorensen coefficient scores.