lecture07-AssociationRule

lecture07-AssociationRule - Lecture Note 7 Lecture Note 7...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture Note 7 Lecture Note 7 Association Rule Mining Association Rule Mining By Gabriel Fung, PhD School of Information Technology and Electrical Engineering The University Of Queensland INFS4203 / INFS7203 – Data Mining Introduction • Assume we have a store and only sold five items. – Transaction records of five customers: – Then, we can draw this matrix: P. 2 Customer Items Bought 1 Orange, Soda 2 Milk, Orange, Cleaner 3 Orange, Detergent 4 Orange, Detergent, Soda 5 Cleaner, Soda Orange Cleaner Milk Soda Detergen t Orange 4 Cleaner 1 2 Milk 1 1 1 Soda 2 1 3 Introduction • Now, suppose we have thousand of customers… • Then: – Observations • Orange and Soda are more likely to be purchased together • Detergent is never purchased with cleaner and milk – Suggestion • If a customer purchase Soda ⇒ purchase Orange • If a customer purchase cleaner ⇒ not purchase Detergent • … – Action • … P. 3 Orange Cleaner Milk Soda Detergent Orange 1000 Cleaner 100 1000 Milk 700 50 1000 Soda 900 50 100 1000 Detergen t 50 50 1000 What is Association Rule? P. 4 • Given a set of transactions, find rules that will predict the occurrence of an item based on the occurrences of other items in the transaction – Note: Implication means co-occurrence, not causality!!! Customer Items Bought 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke {Diaper} → {Beer}, {Milk, Bread} → {Eggs, Coke}, {Beer, Bread} → {Milk}, Example of Association Rules Why Association Rule is Important? • Well… Many many many many applications… – Market basket analysis • E.g. Amazon – Web log mining – Product discount – … P. 5 Terminology • Itemset – A collection of items • E.g. {Milk, Bread, Diaper} • k-itemset – An itemset that contains k items • Support count ( σ ) – Frequency of occurrence of an itemset • E.g. σ ({Milk, Bread,Diaper}) = 2 • Frequent Itemset – An itemset whose support is greater than or equal to a minsup threshold P. 6 Customer Items Bought 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke Association Rule – Formal Definition • Definition – An implication expression of the form X ⇒ Y, where X and Y are both itemsets • E.g. {Milk, Diaper} ⇒ {Beer} • Evaluation criteria: – Support ( s ) • Fraction of transactions that contain both X and Y • s = P(condition and result) – Confidence ( c ) • Measures how often items in Y appear in transactions that contain • c = P(condition and result) / P(condition) P. 7 Example 1 • Given the rule: – {Milk, Diaper} ⇒ {Beer} • Support: – s = P(condition and result) • Confidence: – c = P(condition and result) / P(condition) P. 8 Customer Items Bought 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5...
View Full Document

{[ snackBarMessage ]}

Page1 / 38

lecture07-AssociationRule - Lecture Note 7 Lecture Note 7...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online