Session Ready
Exercise

Filtering with support and conviction

In the video, we discussed the continued consulting work you are doing for the founder of an ebook selling start-up. The founder has approached you with the DataFrame rules, which contains the work of a data scientist who was previously on staff. It includes columns for antecedents and consequents, along with the performance for each of those rules with respect to a number of metrics.

Your objective will be to perform multi-metric filtering on the dataset to identify potentially useful rules. Note that pandas is available as pd and numpy as np. Additionally, rules has been defined and is available.

Instructions
100 XP
  • Use the .head() method with print to preview the dataset.
  • Select the subset of rules with an antecedent support greater than 0.05.
  • Select the subset of rules with a consequent support greater than 0.01.
  • Select the subset of rules with a conviction greater than 1.01.