In order to understand how closeness is computed, let's compute it manually using the shortest path procedures of GDS. In Chapter 4, The Graph Data Science Plugin and Path Finding, we discovered the Single Source Shortest Path algorithm (deltastepping), which can compute the shortest path between a given start node and all the other nodes in the graph. We are going to use this procedure to find the sum of distances from one node to all others, and then infer centrality.
To do so, we are going to use the undirected version of the test graph we used in the Understanding the PageRank algorithm section. To create the projected graph, use the following query:
CALL gds.graph.create("projected_graph_undirected_weight", "Node", {
LINKED_TO: {
type: "LINKED_TO",
orientation: "UNDIRECTED",
properties: {
weight: {
property...