Building a Graph from the Wholesale Wine Data
In this chapter, I want to demonstrate how to detect clusters within your customer purchase data by representing that data as a graph. Some businesses have data that's already graphable, such as the Medicare referral data discussed earlier.
But in this case, the wine purchase matrix from Chapter 2 does not represent customer-to-customer relationships out of the box.
To start, you should figure out how to graph the wholesale wine dataset as a network. And that means constructing an adjacency matrix similar to the Friends adjacency matrix shown in Figure 5.2. From there you'll be able to visualize and...