Accessing the Data

Using a Variable File node, connect to the dataset BASKETS1n, selecting to read field names from the file. Connect a Type node to the data source, and then connect the node to a Table node. Set the measurement level of the field cardid to Typeless (because each loyalty card ID occurs only once in the dataset and can therefore be of no use in modeling). Select Nominal as the measurement level for the field sex (this is to ensure that the Apriori modeling algorithm will not treat sex as a flag).

Figure 1. baskrule stream
baskrule stream

Now run the stream to instantiate the Type node and display the table. The dataset contains 18 fields, with each record representing a basket.

The 18 fields are presented in the following headings.

Basket summary:

  • cardid. Loyalty card identifier for customer purchasing this basket.
  • value. Total purchase price of basket.
  • pmethod. Method of payment for basket.

Personal details of cardholder:

  • sex
  • homeown. Whether or not cardholder is a homeowner.
  • income
  • age

Basket contents—flags for presence of product categories:

  • fruitveg
  • freshmeat
  • dairy
  • cannedveg
  • cannedmeat
  • frozenmeal
  • beer
  • wine
  • softdrink
  • fish
  • confectionery

Next