Here a few exercises to test your understanding of this chapter:
- Modify the Python implementation of PageRank to take weighted edges into account.
- Rework this implementation using networkx, especially using a networkx.Graph object (instead of a dictionary) as input.
- Store the PageRank results in a new node property.
Hint: Use the gds.pagerank.write procedure.
In a more general way, I encourage you to modify the test graph whose centrality results are shown in the Comparing centrality metrics section by adding/removing nodes and/or relationships. This will help you see how the different centralities evolve and make sure you understand this evolution.