Exercise

Plotting Metrics Over Time

We can also examine how metrics for the overall graph change (or don't) through time. Earlier we looked at two important ones, clustering and reciprocity. Each were quite high, as we expected after visually inspecting the graph structure. However, over time, each of these might change. Are global purchasing patterns on Amazon stable? If we think so, then we expect plots of these metrics to essentially be horizontal lines, indicating that reciprocity is about the same every day and there's a high degree of clustering structure. Let's see what we can find here.

Code to calculate the transitivity by graph is shown.

Instructions 1/3

undefined XP
    1
    2
    3
  • Calculate the reciprocity by graph. This should take the same form as transitivity_by_graph except
    • the metric should be "reciprocity" and
    • the score function should be reciprocity().