The Harmonic Centrality algorithm calculates the harmonic centrality of each vertex in the graph. Harmonic Centrality is a variant of Closeness Centrality. In a (not necessarily connected) graph, the harmonic centrality reverses the sum and reciprocal operations in the definition of closeness centrality:
If your graph has many unconnected clusters, the harmonic centrality could be a better indicator of centrality than closeness centrality.
For more information, see Harmonic Centrality.
If we have the following graph, we can see that Ivy is the most central of the five vertices. Running the algorithm on the graph shows that Ivy has the highest centrality score:
Name
Description
Data type
v_type
Vertex types to calculate harmonic centrality for
SET<STRING>
e_type
Edge types to traverse
SET<STRING>
re_type
Reverse edge types. For undirected edges, fill in the edge type name in this parameter as well as the e_type
parameter.
SET<STRING>
max_hops
The maximum number of hops the algorithm would consider for each vertex. If set to a non-positive value, the limit is ignored.
INT
top_k
Sort the scores high to low and output the highest k
scores
INT
wf
If true
, use the Wasserman-Faust normalization for multi-component graphs
BOOL
print_accum
If true
, output JSON to standard output
BOOL
result_attr
If not empty, store centrality values (FLOAT) to this attribute
STRING
file_path
If not empty, write output to this file in CSV.
STRING
display_edges
If true
, include the graph's edges in the JSON output, so that the full graph can be displayed.
BOOL