Professional Documents
Culture Documents
DMBAR Chapter 14 Association Rules and Collaborative Filtering
DMBAR Chapter 14 Association Rules and Collaborative Filtering
DMBAR Chapter 14 Association Rules and Collaborative Filtering
ANALYTICS IN R
Indian Adaptation by
O.P. Wali, Professor, Indian Institute of Foreign Trade
Copyright © 2022 by John Wiley & Sons, Inc. All rights reserved.
CHAPTER 14
Put simply, association rules, or affinity analysis, constitute a study of “what goes with what.” This method is also
called market basket analysis. Association rules are heavily used in retail for learning about items that are purchased
together, but they are also useful in other fields.
14.1 ASSOCIATION RULES
Data Format
Transaction data are usually displayed in one of two formats: a transactions database (with each row representing a
list of items purchased in a single transaction), or a binary incidence matrix in which columns are items, rows again
represent transactions, and each cell has either a 1 or a 0, indicating the presence or absence of an item in the
transaction.
14.1 ASSOCIATION RULES
Leverage computes the difference between the observed frequency of A and C appearing together and
the frequency that would be expected if A and C were independent. A leverage value of 0 indicates
independence.
The implications are that lift may find very strong associations for less frequent items, while leverage
tends to prioritize items with higher frequencies/support in the dataset.
Conviction compares the probability that X appears without Y if they were dependent with the actual
frequency of the appearance of X without Y. Unlike confidence, conviction factors in both P(X) and
P(Y) and always has a value of 1 when the relevant items are completely unrelated
Conviction is a directed measure. Hence, while lift is the same for both (Eggs→Bacon) and
(Bacon→Eggs), conviction is different between the two, with Conv(Eggs→Bacon) being much higher.
Thus, you can use conviction to evaluate the directional relationship between your items.
14.2 COLLABORATIVE FILTERING
Collaborative filtering is a popular technique used by such recommendation systems. The term collaborative filtering
is based on the notions of identifying relevant items for a specific user from the very large set of items (“filtering”) by
considering preferences of many users (“collaboration”).
• This method makes automatic predictions (filtering) about the interests of a user by collecting preferences or taste
information from many users (collaborating). The underlying assumption of the collaborative filtering approach is
that if a person A has the same opinion as a person B on a set of items, A is more likely to have B's opinion for a
given item than that of a randomly chosen person.
14.2 COLLABORATIVE FILTERING
These distinctions are sharper for purchases and recommendations of non-popular items, especially when comparing
association rules to user-based collaborative filtering. When considering what to recommend to a user who
purchased a popular item, then association rules and item-based collaborative filtering might yield the same
recommendation for a single item.
14.3 SUMMARY
Association rules (also called market basket analysis) and collaborative filtering are unsupervised methods for
deducing associations between purchased items from databases of transactions. Association rules search for generic
rules about items that are purchased together. The main advantage of this method is that it generates clear, simple
rules of the form “IF X is purchased, THEN Y is also likely to be purchased.” The method is very transparent and easy
to understand.
THANK YOU