Association Rule Mining
Within this exercise, you can get a deeper understanding of association rule mining and learn how to identify good rules for a sample data set.
Libraries and Data
The first part of the exercise is about association rule mining. In Python, you can use the mlxtend
library for the mining of association rules.
We use data about store baskets in this exercise. You can use the following code to load the data. The code creates a list of records, where each record is a list of the items that are part of the transaction.
with open('store_data.csv') as f:
records = []
for line in f:
records.append(line.strip().split(','))