Exercise

Finding Dyads and Triads

Let's think a little bit more about what we can learn from dyad and triad censuses of the overall graph. Because we are interested in understanding how items are purchased together and whether or not they are reciprocally purchased, dyad and triad censuses can provide a useful initial look. A dyad census will tell us how many items are purchased reciprocally vs. asymmetrically. The triad census will tell us which items might be important, specifically patterns 4, 9, and 12. All of these have one vertex that has 2 out degree edges and no in degree edges. Edge density should also give some insight we expect for graph clustering.

The Amazon co-purchase graph, amzn_g, is available.

Instructions

100 XP

Explore amzn_g.

  • Do a dyad census using the dyad_census() function.
  • Do a triad census using the triad_census() function.
  • Find the edge density using the edge_density() function.