The algorithmic perspective

We now come to the much more difficult task of identifying frequent itemsets in a database. Once we know which itemsets and associations we want to generate rules for, calculating the support and confidence of the rules is quite easy. The difficulty, however, lies in automatically discovering the frequent and interesting itemsets in a database of millions of transactions among thousands of possible items.

Imagine that your e-commerce store only carries 100 unique items. Obviously, your customers can purchase any number of items during a session. Let's say a shopper buys only two items—there are 4,950 different combinations of two items from your catalog to consider. But you also must consider shoppers who buy three ...

Get Hands-on Machine Learning with JavaScript 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.