From the course: Machine Learning with Python: Association Rules

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

The FP-Growth algorithm

The FP-Growth algorithm

- [Instructor] Frequent item set generation is a useful approach in limiting our focus to just those rules which are potentially actionable. While more efficient than the brute force approach it is still computationally expensive. There are two common ways to reduce computational complexity during the process. One approach is to reduce the number of candidates item sets that we create by leveraging the Apriori principle. That is what the Apriori algorithm does. The other approach is to compress the data by storing the candidate's item sets in an advanced data structure, so that the frequent pattern tree or FP-tree. This is what the FP growth algorithm does. To illustrate how the FP growth algorithm works, let's consider these 10 transactions from a corner fruit vendor. To begin, the algorithm does some pre-processing. The first step is to get a count of each item listed in descending order of count as shown here. Let's…

Contents