Exercise

Using parallel coordinates to visualize rules

Your visual demonstration in the previous exercise convinced the founder that the supply-confidence border is worthy of further exploration. She now suggests that you extract part of the border and visualize it. Since the rules that fall on the border are strong with respect to most common metrics, she argues that you should simply visualize whether a rule exists, rather than the intensity of the rule according to some metric.

You realize that a parallel coordinates plot is ideal for such cases. The data has been imported for you as onehot. Additionally, apriori(), association_rules(), and parallel_coordinates() have been imported, and pandas is available as pd. The function rules_to_coordinates() has been defined and is available.

Instructions

100 XP
  • Complete the Apriori algorithm statement using a minimum support of 0.05.
  • Compute association rules using a minimum confidence threshold of 0.50. This is sufficiently high to exclusively capture points near the upper part of the supply-confidence border.
  • Convert the rules into coordinates.
  • Plot the coordinates using parallel_coordinates().