Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Data Mining and Warehousing: Session 6 Association Analysis Jia-wei Han

Similar presentations


Presentation on theme: "1 Data Mining and Warehousing: Session 6 Association Analysis Jia-wei Han"— Presentation transcript:

1 1 Data Mining and Warehousing: Session 6 Association Analysis Jia-wei Han http://www.cs.sfu.ca/~han

2 2 Session 6: Association Analysis \ What is association analysis? \ Mining single-dimensional Boolean association rules in transactional databases \ Mining multi-level association rules \ Mining multi-dimensional association rules \ Constraint-based association mining \ Beyond classical association analysis

3 3 What Is Association Mining? \ Association rule mining: ² Finding association, correlation, or causal structures among sets of items or objects in transaction databases, relational databases, and other information repositories. \ Applications: ² Basket data analysis, cross-marketing, catalog design, loss-leader analysis, clustering, classification, etc. \ Examples.  Rule form: “Body  ead [support, confidence]”.  buys(x, “diapers”)  buys(x, “beers”) [0.5%, 60%]  major(x, “CS”) ^ takes(x, “DB”)  grade(x, “A”) [1%, 75%]

4 4 What Is an Association Rule? \ Given ² A database of customer transactions ² Each transaction is a list of items (purchased by a customer in a visit) \ Find all rules that correlate the presence of one set of items with that of another set of items ² Example: 98% of people who purchase tires and auto accessories also get automotive services done ² Any number of items in the consequent/antecedent of rule ² Possible to specify constraints on rules (e.g., find only rules involving Home Laundry Appliances).

5 5 Application Examples \ Market Basket Analysis ² *  Maintenance Agreement What the store should do to boost Maintenance Agreement sales ² Home Electronics  * What other products should the store stocks up on if the store has a sale on Home Electronics \ Attached mailing in direct marketing \ Detecting “ping-pong”ing of patients transaction: patient item: doctor/clinic visited by a patient support of a rule: number of common patients

6 6 Rule Measures: Support and Confidence \ Find all the rules X & Y  Z with minimum confidence and support ² support, s, probability that a transaction contains {X, Y, Z} ² confidence, c, conditional probability that a transaction having {X, Y} also contains Z. Let minimum support 50%, and minimum confidence 50%, we have ² A  C (50%, 66.6%) ² C  A (50%, 100%) Customer buys diaper Customer buys both Customer buys beer

7 7 Mining Association Rules -- Example For rule A  C: support = support({A, C}) = 50% confidence = support({A, C})/support({A}) = 66.6% The Apriori principle: Any subset of a frequent itemset must be frequent. Min. support 50% Min. confidence 50%

8 8 Mining Frequent Itemsets: the Key Step À Find the frequent itemsets: the sets of items that have minimum support u A subset of a frequent itemset must also be a frequent itemset, i.e., if {AB} is a frequent itemset, both {A} and {B} should be a frequent itemset u Iteratively find frequent itemsets with cardinality from 1 to k (k-itemset) Á Use the frequent itemsets to generate association rules.

9 9 The Apriori Algorithm C k : Candidate itemset of size k L k : frequent itemset of size k L 1 = {frequent items}; for (k = 1; L k !=  ; k++) do begin C k+1 = candidates generated from L k ; for each transaction t in database do increment the count of all candidates in C k+1 that are contained in t L k+1 = candidates in C k+1 with min_support end return  k L k ;

10 10 The Apriori Algorithm -- Example Database D Scan D C1C1 L1L1 L2L2 C2C2 C2C2 C3C3 L3L3

11 11 Partitioning (Navathe et. al VLDB95) Association Rule Mining mining association rules (Agrawal et. al SIGMOD93) Parallel mining (Agrawal et. al TKDE96) Fast algorithm (Agrawal et. al VLDB94) Direct Itemset Counting (Brin et. al SIGMOD97) Generalized A.R. (Srikant et. al; Han et. al. VLDB95) Quantitative A.R. (Srikant et. al SIGMOD96) Hash-based (Park et. al SIGMOD95) Distributed mining (Cheung et. al PDIS96) Incremental mining (Cheung et. al ICDE96) Problem extension Better algorithms Meta-ruleguided mining N-dimensional A.R. (Lu et. al DMKD’98)

12 12 Mining Different Kinds of Association Rules \ Boolean vs. quantitative associations ² Association on discrete vs. continuous data \ Single dimension vs. multiple dimensional associations ² E.g., association on items bought vs. on multiple predicates. \ Single level vs. multiple-level analysis ² E.g., what brands of beers are associated with what brands of diapers? \ Simple vs. constraint-based ² E.g., small sales (sum 1,000)? \ Association vs. correlation analysis. ² Association does not necessarily imply correlation.

13 13 Session 6: Association Analysis \ What is association analysis? \ Mining single-dimensional Boolean association rules in transactional databases \ Mining multi-level association rules \ Mining multi-dimensional association rules \ Constraint-based association mining \ Beyond classical association analysis

14 14 Optimization: Direct Hash and Pruning \ DHP: Direct Hash and Pruning ( Park, Chen and Yu, SIGMOD’95 ). ² Reduce the size of candidate sets to minimize the cost ² Reduce the size of the transaction database as well \ Using a hash table to keep track the counts of 2-itemset. Using the counts to prune C 2 (C 2 is usually the largest) \ An item in transaction t can be trimmed it if does not appear in at least k of the candidate k-itemsets in t.

15 15 Optimization: The Partitioning Algorithm \ Partition (Savasere, Omiecinski, & Navathe, VLDB’95). ² Divide database into n partitions. ² A frequent item must be frequent in at least one partition. ² Process one partition in main memory at a time: –For each partition, generate frequent itemsets using the Apriori algorithm –also form tidlist for all item sets to facilitate counting in the merge phase ² After all partitions are processed, the local frequent itemsets are merged into global frequent sets; support can be computed from the tidlists.

16 16 Optimization: Sampling and Itemset Counting \ Sampling (Toivonen’96). ² A probabilistic approach finds association rules in about one pass. \ Dynamic Itemset Counting (Brin et. al. SIGMOD’97) ² Reducing the number of scans over the transactions by starting to count itemsets dynamically during scans ² Using trie structure to keep track counters and reordering items to reduce increment costs

17 17 Incremental Update of Discovered Rules \ Partitioned derivation and incremental updating. \ A fast updating algorithm, FUP (Cheung et al.’96)  View a database: original DB  incremental db. ² A k-itemset (for any k), * frequent in DB  db if frequent in both DB and db. * infrequent in DB  db if also in both DB and db. ² For those only frequent in DB, merge corresponding counts in db. ² For those only frequent in db, search DB to update their itemset counts. \ Similar methods can be adopted for data removal and update. \ Principles applicable to distributed/parallel mining.

18 18 Parallel and Distributed Mining \ PDM (Park et al.’95): ²Use a hashing technique (DHP-like) to identify candidate k-itemsets from the local databases. \ Count Distribution (Agrawal & Shafer’96): ² An extension of the Apriori algorithm. ² May require a lot of messages in count exchange. \ FDM (Cheung et al.’96). ² Observation: If an itemset X is globally large, there exists partition Di such that X and all its subsets are locally large at Di. ² Candidate sets are those which are also local candidates in some component database, plus some message passing optimizations.

19 19 Presentation of Association Rules ( Table Form )

20 20 Visualization of Association Rule Using Rule Graph

21 21 Visualization of Association Rule Using Plane Graph

22 22 References \ R. Agrawal, T. Imielinski, and A. Swami. Mining association rules between sets of items in large databases. SIGMOD'93, 207-216, Washington, D.C. \ R. Agrawal and R. Srikant. Fast algorithms for mining association rules. VLDB'94 487-499, Santiago, Chile. \ R. Agrawal and R. Srikant. Mining sequential patterns. ICDE'95, 3-14, Taipei, Taiwan. \ R. J. Bayardo. Efficiently mining long patterns from databases. SIGMOD'98, 85-93, Seattle, Washington. \ S. Brin, R. Motwani, and C. Silverstein. Beyond market basket: Generalizing association rules to correlations. SIGMOD'97, 265-276, Tucson, Arizona. \ S. Chaudhuri. Data mining and database systems: Where is the intersection? Bulletin of the Technical Committee on Data Engineering, 21:4-8, March 1998. \ D.W. Cheung, J. Han, V. Ng, and C.Y. Wong. Maintenance of discovered association rules in large databases: An incremental updating technique. ICDE'96, 106-114, New Orleans, LA.. \ T. Fukuda, Y. Morimoto, S. Morishita, and T. Tokuyama. Data mining using two- dimensional optimized association rules: Scheme, algorithms, and visualization. SIGMOD'96, 13-23, Montreal, Canada. \ E.-H. Han, G. Karypis, and V. Kumar. Scalable parallel data mining for association rules. SIGMOD'97, 277-288, Tucson, Arizona. \ J. Han, G. Dong, and Y. Yin. Efficient mining of partial periodic patterns in time series database. ICDE'99, Sydney, Australia.

23 23 References (2) \ J. Han and Y. Fu. Discovery of multiple-level association rules from large databases. VLDB'95, 420-431, Zurich, Switzerland. \ T. Imielinski and H. Mannila. A database perspective on knowledge discovery. Communications of ACM, 39:58-64, 1996. \ M. Kamber, J. Han, and J. Y. Chiang. Metarule-guided mining of multi-dimensional association rules using data cubes. KDD'97, 207-210, Newport Beach, California. \ M. Klemettinen, H. Mannila, P. Ronkainen, H. Toivonen, and A.I. Verkamo. Finding interesting rules from large sets of discovered association rules. CIKM'94, 401-408, Gaithersburg, Maryland. \ F. Korn, A. Labrinidis, Y. Kotidis, and C. Faloutsos. Ratio rules: A new paradigm for fast, quantifiable data mining. VLDB'98, 582-593, New York, NY. \ B. Lent, A. Swami, and J. Widom. Clustering association rules. ICDE'97, 220-231, Birmingham, England. \ H. Lu, J. Han, and L. Feng. Stock movement and n-dimensional inter-transaction association rules. SIGMOD Workshop on Research Issues on Data Mining and Knowledge Discovery (DMKD'98), 12:1-12:7, Seattle, Washington. \ H. Mannila, H Toivonen, and A. I. Verkamo. Discovery of frequent episodes in event sequences. Data Mining and Knowledge Discovery, 1:259-289, 1997. \ R. Meo, G. Psaila, and S. Ceri. A new SQL-like operator for mining association rules. VLDB'96, 122-133, Bombay, India. \ R.J. Miller and Y. Yang. Association rules over interval data. SIGMOD'97, 452-461, Tucson, Arizona.

24 24 References (3) \ R. Ng, L. V. S. Lakshmanan, J. Han, and A. Pang. Exploratory mining and pruning optimizations of constrained associations rules. SIGMOD'98, 13-24, Seattle, Washington. \ B. Ozden, S. Ramaswamy, and A. Silberschatz. Cyclic association rules. ICDE'98, 412-421, Orlando, FL. \ J.S. Park, M.S. Chen, and P.S. Yu. An effective hash-based algorithm for mining association rules. SIGMOD'95, 175-186, San Jose, CA. \ S. Ramaswamy, S. Mahajan, and A. Silberschatz. On the discovery of interesting patterns in association rules. VLDB'98, 368-379, New York, NY. \ S. Sarawagi, S. Thomas, and R. Agrawal. Integrating association rule mining with relational database systems: Alternatives and implications. SIGMOD'98, 343-354, Seattle, WA. \ A. Savasere, E. Omiecinski, and S. Navathe. An efficient algorithm for mining association rules in large databases. VLDB'95, 432-443, Zurich, Switzerland. \ C. Silverstein, S. Brin, R. Motwani, and J. Ullman. Scalable techniques for mining causal structures. VLDB'98, 594-605, New York, NY. \ R. Srikant and R. Agrawal. Mining generalized association rules. VLDB'95, 407-419, Zurich, Switzerland. \ R. Srikant and R. Agrawal. Mining quantitative association rules in large relational tables. SIGMOD'96, 1-12, Montreal, Canada. \ R. Srikant, Q. Vu, and R. Agrawal. Mining association rules with item constraints. KDD'97, 67-73, Newport Beach, California. \ H. Toivonen. Sampling large databases for association rules. VLDB'96, 134-145, Bombay, India, Sept. 1996. \ D. Tsur, J. D. Ullman, S. Abitboul, C. Clifton, R. Motwani, and S. Nestorov. Query flocks: A generalization of association-rule mining. SIGMOD'98, 1-12, Seattle, Washington.


Download ppt "1 Data Mining and Warehousing: Session 6 Association Analysis Jia-wei Han"

Similar presentations


Ads by Google