Q4. Difference between Apriori and FP Growth.
Difference between Apriori and FP Growth
1. It is an array based algorithm.
2. It uses Join and Prune technique.
3. Apriori uses a breadth-first search
4. Apriori utilizes a level-wise approach where it generates patterns containing 1 item, then 2 items, then 3 items, and so on.
5. Candidate generation is extremely slow. Runtime increases exponentially depending on the number of different items.
6. Candidate generation is very parallelizable.
7. It requires large memory space due to large number of candidate generation.
8. It scans the database multiple times for generating candidate sets.
1. It is a tree based algorithm.
2. It constructs conditional frequent pattern tree and conditional pattern base from database which satisfy minimum support.
3. FP Growth uses a depth-first search
4. FP Growth utilizes a pattern-growth approach means that, it only considers patterns actually existing in the database.
5. Runtime increases linearly, depending on the number of transactions and items
6. Data are very interdependent, each node needs the root.
7. It requires less memory space due to compact structure and no candidate generation.
8. It scans the database only twice for constructing frequent pattern tree.