Download presentation
Presentation is loading. Please wait.
1
Association Rules Carissa Wang February 23, 2010
2
What is Association Rule In data mining, it is a method for discovering relations between different sets of items in a large database. Database A large collection of transactions Example - Market basket database
3
Definition X => Y X = {x 1, x 2, …, x n } Y = {y 1, y 2, …, y n } x i and y j are distinct items for all i and all j X is the left-hand-side (LHS) Y is the right-hand-side (RHS)
4
Example Transaction IDItems Bought 1Milk, bread, cookies, juice 2Milk, juice 3Milk, eggs 4Bread, cookies, coffee
5
Measuring the rule Support Frequency of an item set occurs in the database Item set – LHS RHS Confidence Probability of LHS => RHS
6
Support Rules Milk => juice Bread => juice {milk, juice} 2 / 4 = 0.50 {bread, juice} 1 / 4 = 0.25 Transaction ID Items Bought 1Milk, bread, cookies, juice 2Milk, juice 3Milk, eggs 4Bread, cookies, coffee
7
Confidence Rules Milk => juice Bread => juice Milk => juice 0.50 / 0.75 = 0.67 Bread => juice 0.25 / 0.50 = 0.50 Transactio n ID Items Bought 1Milk, bread, cookies, juice 2Milk, juice 3Milk, eggs 4Bread, cookies, coffee
8
What these numbers mean Support High – LHS => RHS Low – not enough evidence of LHS => RHS Confidence High – given condition LHS, RHS will occur Low – RHS does not occur consistently
9
Other measures of association rule Lift Conviction All – confidence Collective strength Leverage
10
Algorithm to generate association rule Apriori Algorithm Eclat Algorithm Frequent Pattern Growth Algorithm One Attribute Rule Zero Attribute Rule
11
Apriori Algorithm Database with large transactions Breadth-first search Two properties Downward closure Antimonotonicity
12
Apriori Property Downward Closure Subset of large item set is also large Antimonotonicity Superset of small item set is small
13
How Apriori algorithm works Find subsets with minimum frequency of in the given transactions Extend the subsets by one item and keep the subsets that meet the minimum frequency Repeat last step until no frequent superset
14
How Apriori algorithm works ItemSupport 13 26 34 45 ItemSupport {1,2}3 {1,3}2 {1,4}3 {2,3}4 {2,4}5 {3,4}3 ItemSupport {1,2,4}3 {2,3,4}3 Min Frequency = 3
15
Applications Web usage mining Intrusion detection Bioinformatics
17
Reference Apriori algorithm, Wikipedia http://en.wikipedia.org/wiki/Apriori_algorithm Fundamentals of Database Systems, 5 th ed, Elmasri and Navathe Association rule learning, Wikipedia http://en.wikipedia.org/wiki/Association_rules
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.