1. Learn
  2. /
  3. Courses
  4. /
  5. Market Basket Analysis in Python

Exercise

Visualizing itemset support

A content-streaming start-up has approached you for consulting services. To keep licensing fees low, they want to assemble a narrow library of movies that all appeal to the same audience. While they'll provide a smaller selection of content than the big players in the industry, they'll also be able to offer a low subscription fee.

You decide to use the MovieLens data and a heatmap for this project. Using a simple support-based heatmap will allow you to identify individual titles that have high support with other titles. The one-hot encoded data is available as the DataFrame onehot. Additionally, pandas is available as pd, seaborn is available as sns, and apriori() and association_rules() have both been imported.

Instructions 1/2

undefined XP
    1
    2
  • Compute the frequent itemsets using a minimum support of 0.07.
  • Compute the association rules and apply no pruning to the rules.