Discovering affinities in basket contents

First, you need to acquire an overall picture of affinities (associations) in the basket contents using Apriori to produce association rules. Select the fields to be used in this modeling process by editing the Type node and setting the role of all of the product categories to Both and all other roles to None. (Both means that the field can be either an input or an output of the resultant model.)

Note: You can set options for multiple fields using Shift-click to select the fields before specifying an option from the columns.

Figure 1. Selecting fields for modeling
Selecting fields for modeling

Once you have specified fields for modeling, attach an Apriori node to the Type node, edit it, select the option Only true values for flags, and click run on the Apriori node. The result, a model on the Models tab at the upper right of the managers window, contains association rules that you can view by using the context menu and selecting Browse.

Figure 2. Association rules
Association rules

These rules show a variety of associations between frozen meals, canned vegetables, and beer. The presence of two-way association rules, such as:

frozenmeal -> beer 
beer -> frozenmeal
 

suggests that a web display (which shows only two-way associations) might highlight some of the patterns in this data.

Attach a Web node to the Type node, edit the Web node, select all of the basket contents fields, select Show true flags only, and click run on the Web node.

Figure 3. Web display of product associations
Web display of product associations

Because most combinations of product categories occur in several baskets, the strong links on this web are too numerous to show the groups of customers suggested by the model.

Figure 4. Restricted web display
Restricted web display
  1. To specify weak and strong connections, click the yellow double arrow button on the toolbar. This expands the dialog box showing the web output summary and controls.
  2. Select Size shows strong/normal/weak.
  3. Set weak links below 90.
  4. Set strong links above 100.

In the resulting display, three groups of customers stand out:

  • Those who buy fish and fruits and vegetables, who might be called "healthy eaters"
  • Those who buy wine and confectionery
  • Those who buy beer, frozen meals, and canned vegetables ("beer, beans, and pizza")

Next