Association Rules l Mining Association Rules between Sets of Items in Large Databases (R. Agrawal, T. Imielinski & A. Swami) 1993. l Fast Algorithms for.

Slides:



Advertisements
Similar presentations
Mining Association Rules in Large Databases
Advertisements

Brian Chase.  Retailers now have massive databases full of transactional history ◦ Simply transaction date and list of items  Is it possible to gain.
Huffman Codes and Asssociation Rules (II) Prof. Sin-Min Lee Department of Computer Science.
Association Analysis (2). Example TIDList of item ID’s T1I1, I2, I5 T2I2, I4 T3I2, I3 T4I1, I2, I4 T5I1, I3 T6I2, I3 T7I1, I3 T8I1, I2, I3, I5 T9I1, I2,
Frequent Itemset Mining Methods. The Apriori algorithm Finding frequent itemsets using candidate generation Seminal algorithm proposed by R. Agrawal and.
Data Mining (Apriori Algorithm)DCS 802, Spring DCS 802 Data Mining Apriori Algorithm Spring of 2002 Prof. Sung-Hyuk Cha School of Computer Science.
10 -1 Lecture 10 Association Rules Mining Topics –Basics –Mining Frequent Patterns –Mining Frequent Sequential Patterns –Applications.
Association rules The goal of mining association rules is to generate all possible rules that exceed some minimum user-specified support and confidence.
Data Mining Association Analysis: Basic Concepts and Algorithms
Association Mining Data Mining Spring Transactional Database Transaction – A row in the database i.e.: {Eggs, Cheese, Milk} Transactional Database.
Rakesh Agrawal Ramakrishnan Srikant
Association Analysis. Association Rule Mining: Definition Given a set of records each of which contain some number of items from a given collection; –Produce.
Chapter 5: Mining Frequent Patterns, Association and Correlations
Data Mining Techniques So Far: Cluster analysis K-means Classification Decision Trees J48 (C4.5) Rule-based classification JRIP (RIPPER) Logistic Regression.
Data Mining Association Analysis: Basic Concepts and Algorithms Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach, Kumar Introduction.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
732A02 Data Mining - Clustering and Association Analysis ………………… Jose M. Peña Association rules Apriori algorithm FP grow algorithm.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
1 Fast Algorithms for Mining Association Rules Rakesh Agrawal Ramakrishnan Srikant.
Association Analysis (2). Example TIDList of item ID’s T1I1, I2, I5 T2I2, I4 T3I2, I3 T4I1, I2, I4 T5I1, I3 T6I2, I3 T7I1, I3 T8I1, I2, I3, I5 T9I1, I2,
Data Mining Association Analysis: Basic Concepts and Algorithms
Data Quality Class 9. Rule Discovery Decision and Classification Trees Association Rules.
Data Mining Association Rules Yao Meng Hongli Li Database II Fall 2002.
4/3/01CS632 - Data Mining1 Data Mining Presented By: Kevin Seng.
Association Analysis: Basic Concepts and Algorithms.
1 Mining Quantitative Association Rules in Large Relational Database Presented by Jin Jin April 1, 2004.
Data Mining Association Analysis: Basic Concepts and Algorithms
Fast Algorithms for Mining Association Rules * CS401 Final Presentation Presented by Lin Yang University of Missouri-Rolla * Rakesh Agrawal, Ramakrishnam.
Mining Association Rules in Large Databases
1 ACCTG 6910 Building Enterprise & Business Intelligence Systems (e.bis) Association Rule Mining Olivia R. Liu Sheng, Ph.D. Emma Eccles Jones Presidential.
© Vipin Kumar CSci 8980 Fall CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance Computing Research Center Department of Computer.
2/8/00CSE 711 data mining: Apriori Algorithm by S. Cha 1 CSE 711 Seminar on Data Mining: Apriori Algorithm By Sung-Hyuk Cha.
Fast Algorithms for Association Rule Mining
Mining Association Rules
1 Fast Algorithms for Mining Association Rules Rakesh Agrawal Ramakrishnan Srikant Slides from Ofer Pasternak.
Mining Association Rules
Mining Association Rules in Large Databases. What Is Association Rule Mining?  Association rule mining: Finding frequent patterns, associations, correlations,
Association Discovery from Databases Association rules are a simple formalism for expressing positive connections between columns in a 0/1 matrix. A classical.
Mining Association Rules between Sets of Items in Large Databases presented by Zhuang Wang.
Apriori algorithm Seminar of Popular Algorithms in Data Mining and Machine Learning, TKK Presentation Lauri Lahti.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining By Tan, Steinbach, Kumar Lecture.
Modul 7: Association Analysis. 2 Association Rule Mining  Given a set of transactions, find rules that will predict the occurrence of an item based on.
Association Rules. CS583, Bing Liu, UIC 2 Association rule mining Proposed by Agrawal et al in Initially used for Market Basket Analysis to find.
1 Mining Association Rules Mohamed G. Elfeky. 2 Introduction Data mining is the discovery of knowledge and useful information from the large amounts of.
Frequent Item Mining. What is data mining? =Pattern Mining? What patterns? Why are they useful?
Fast Algorithms For Mining Association Rules By Rakesh Agrawal and R. Srikant Presented By: Chirayu Modi.
CS 8751 ML & KDDSupport Vector Machines1 Mining Association Rules KDD from a DBMS point of view –The importance of efficiency Market basket analysis Association.
CSE4334/5334 DATA MINING CSE4334/5334 Data Mining, Fall 2014 Department of Computer Science and Engineering, University of Texas at Arlington Chengkai.
Fast Algorithms for Mining Association Rules Rakesh Agrawal and Ramakrishnan Srikant VLDB '94 presented by kurt partridge cse 590db oct 4, 1999.
Association Rule Mining Data Mining and Knowledge Discovery Prof. Carolina Ruiz and Weiyang Lin Department of Computer Science Worcester Polytechnic Institute.
Association rule mining Goal: Find all rules that satisfy the user-specified minimum support (minsup) and minimum confidence (minconf). Assume all data.
Dynamic Itemset Counting and Implication Rules for Market Basket Data.
Data Mining Find information from data data ? information.
Association Rule Mining
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Chapter 8 Association Rules. Data Warehouse and Data Mining Chapter 10 2 Content Association rule mining Mining single-dimensional Boolean association.
Chap 6: Association Rules. Rule Rules!  Motivation ~ recent progress in data mining + warehousing have made it possible to collect HUGE amount of data.
1 Data Mining Lecture 6: Association Analysis. 2 Association Rule Mining l Given a set of transactions, find rules that will predict the occurrence of.
Chapter 3 Data Mining: Classification & Association Chapter 4 in the text box Section: 4.3 (4.3.1),
Data Mining Find information from data data ? information.
Data Mining Association Analysis: Basic Concepts and Algorithms
Data Mining: Concepts and Techniques
Association rule mining
Association Rules Repoussis Panagiotis.
Frequent Pattern Mining
William Norris Professor and Head, Department of Computer Science
Market Basket Analysis and Association Rules
Fast Algorithms for Mining Association Rules
Presentation transcript:

Association Rules l Mining Association Rules between Sets of Items in Large Databases (R. Agrawal, T. Imielinski & A. Swami) l Fast Algorithms for Mining Association Rules (R. Agrawal & R. Srikant) 1994.

Basket Data Retail organizations, e.g., supermarkets, collect and store massive amounts sales data, called basket data. A record consist of n transaction date n items bought Or, basket data may consist of items bought by a customer over a period.

Example Association Rule 90% of transactions that purchase bread and butter also purchase milk Antecedent: bread and butter Consequent: milk Confidence factor: 90%

Example Queries l Find all the rules that have “Uludağ Gazozu” as consequent. l Find all rules that have “Diet Coke” in the antecedent. l Find all rules that have “sausage” in the antecedent and “mustard” in the consequent. l Find all the rules relating items located on shelves A and B in the store. l Find the “best” (most confident) k rules that have “Uludağ Gazozu” in the consequent.

Formal Model I = i 1, i 2, …, i m : set of literals (items) D : database of transactions T  D : a transaction. T  I n TID: unique identifier, associated with each T X: a subset of I n T contains X if X  T.

Formal Model (Cont.) Association rule: X  Y here X  I, Y  I and X  Y = . Rule X  Y has a confidence c in D if c% of transactions in D that contain X also contain Y. Rule X  Y has a support s in D if s% of transactions in D contain X  Y.

Example I : itemset {cucumber, parsley, onion, tomato, salt, bread, olives, cheese, butter} D : set of transactions 1{{cucumber, parsley, onion, tomato, salt, bread}, 2 {tomato, cucumber, parsley}, 3 {tomato, cucumber, olives, onion, parsley}, 4 {tomato, cucumber, onion, bread}, 5 {tomato, salt, onion}, 6 {bread, cheese} 7 {tomato, cheese, cucumber} 8 {bread, butter}}

Problem l Given a set of transactions, l Generate all association rules l that have the support and confidence greater than the user-specified minimum support (minsup) and minimum confidence (minconf).

Problem decomposition 1. Find all itemsets that have transaction support above minimum support. 2. Use the large itemsets to generate the Association rules: 2 1. For every large itemset I, find its all subsets 2.2. For every subset a, output a rule: a  (I - a) if

Discovering Large Itemsets Apriori and AprioriTid algorithms: Basic intuition: Any subset of a large itemset must be large Itemset having k items can be generated by joining large itemsets having k-1 items, and deleting those that contain any subset that is not large. Def. k-itemset: large itemset with k items.

Apriori Algorithm L 1 = { large 1-itemsets } for (k=2; L k-1  ; k++) do begin C k = apriori-gen(L k-1 ); // New candidates forall transactions t  D do begin C’ t = subset (C k, t) // Candidates contained in t forall candidates c  C t do c.count++ end L k = {c  C t | c.count  minsup} end Return  k L k

Apriori Candidate Generation apriori-gen(L k-1 ): Returns a superset of the set of all large k-items l First select two itemsets p, q from L k-1 s.t. first k-2 items of p and q are the same, form a new candidate k-itemset c as common k-2 items + 2 differing items l Prune those c, s.t. some (k-1) subset of c is not in L k-1

Apriori Algorithm (cont.) Go thru all transactions in D, increment the counts of all itemsets in C k l L k is the set of all large itemsets in C k l For minsup s=30%, L= {{bread}, {cheese}, {cucumber}, {onion}, {parsley}, {salt}, {tomato}, {cucumber, onion}, {cucumber, parsley}, {cucumber, tomato}, {onion, tomato}, {parsley, tomato}, {cucumber, parsley, tomato}}

Subset Function Subset (C k, t): candidate itemsets contained in t l Candidate itemsets in C k are stored in a hash-tree l Leaf node: contains a list of itemsets l Interior node: contains a hash table n Each bucket points to another node n Depth of root = 1 n Buckets of a node at depth d points to nodes at depth d+1

Subset Function (cont.) Construction of hash-tree for C k l To add itemset c: n start from the root n go down until reaching a leaf node n At interior node at depth d, to choose the branch to follow, apply a hash function to the d th item of c l All nodes are initially created as leaves l A leaf is converted into internal when the number of nodes exceeds a threshold.

Subset Function (cont.) l After constructing the hash-tree for C k, subset function finds candidates contained in t as follows: n At a leaf, find itemsets contained in t n At an interior node reached by hashing on item i, hash on each item that comes after i in t, recursively apply to the nodes in the corresponding bucket n At root, hash on every item in t.

AprioriTid Algorithm l Uses apriori-gen to generate candidates Database D is not used for counting support after the first pass l The set C k is used, for this purpose l Elements of C k are in the form where each X k is a potentially large k-itemset present in the transaction with identifier TID. l The member of C k corresponding to transaction t is

AprioriTid Algorithm (cont.) L 1 = { large 1-itemsets } for (k=2; L k-1  ; k++) do begin C k = apriori-gen(L k-1 ); // New candidates C k =  forall transactions t  C k do begin // Determine candidates in C k contained in t.TID C’ t = {c  C k | last two elements of c are in t } forall candidates c  C’ t do c.count++ if (C t  ) then C k = += end L k = {c  C’ t | c.count  minsup} end Return  k L k

Example minsup = 2 transactions, s=50 D: TID Items L 1 : Itemset Sup C 1 : TID Set-of-Itemsets {1} {{1},{3},{4}} {2} {{2},{3},{5}} {3} {{1},{2},{3},{5}} {5} {{2},{5}} C 2 ={{100,{{1,3}}},{200,{{2,3},{2,5},{3,5}}, {300,{{2,3},{2,5},{3,5}}, {400,{{2,5}}}} L 2 ={{1,3}, {2,3}, {2,5}, {3,5}}

Performance Example: HW: IBM RS/6000, 33MHz Dataset: Number of Items: 1000 Avg. size of transactions: 10 Avg. size of maximal potentially large items: 4 Number of transactions: 100K Data size: 4.4 MBytes

Apriori vs. AprioriTid Per pass execution times of Apriori and AprioriTid Average size of transactions: 10 Average size of maximal potentially large items: 4 Number of transactions: 100K minsup=0.75%

AprioriHybrid Algorithm l Uses Apriori in the initial passes and switches to AprioriTid when it expects that the set C k at the end of the pass will fit in memory.

Conclusions and Future Work l Apriori, AprioriTid and AprioriHybrid algorithms presented l Future work: n use is-a hirarchies (e.g., beef is-a red-meat is-a meat) n use quantities of items bought l This work is in the context of Quest Project of IBM