Mining frequent itemsets with Eclat

As the Apriori algorithm performs a breadth-first search to scan the complete database, support counting is rather time-consuming. Alternatively, if the database fits into memory, one can use the Eclat algorithm, which performs a depth-first search to count supports. The Eclat algorithm, therefore, runs much more quickly than the Apriori algorithm. In this recipe, we introduce how to use the Eclat algorithm to generate a frequent itemset.

Getting ready

In this recipe, one has to have completed the previous recipe by generating rules and have these stored in a variable named rules.

How to do it…

Please perform the following steps to generate a frequent itemset using the Eclat algorithm:

  1. Similar to the Apriori method, ...

Get R for Data Science Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.