If you use the write procedure instead, you'll notice it returns, among other information, the final modularity. If you run this procedure on our previously created projected graph, projected_graph, you will notice a slightly different modularity value compared to the one we obtained in the previous section. The explanation comes from our projected graph. The initial graph, stored in Neo4j, contains two relationships between D and E (one from D to E and one from E to D). When the GDS creates the projected graph, the default behavior is to store both relationships, which is equivalent to increasing the weight of this edge (the Aij term). Our projected graph is hence equivalent to the following:
G = {
'A': {'B': 1, 'C': 1},
'B': {'A': 1, 'C': 1},
'C': {'A': 1, 'B': 1, 'D': 1},
'D': {&apos...