1 / 29

Association Rule Mining

Association Rule Mining. CS 685: Special Topics in Data Mining Spring 2009. Frequent Pattern Analysis. Finding inherent regularities in data What products were often purchased together?— Beer and diapers?! What are the subsequent purchases after buying a PC?

dalit
Download Presentation

Association Rule Mining

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Association Rule Mining CS 685: Special Topics in Data Mining Spring 2009

  2. Frequent Pattern Analysis • Finding inherent regularities in data • What products were often purchased together?— Beer and diapers?! • What are the subsequent purchases after buying a PC? • What are the commonly occurring subsequences in a group of genes? • What are the shared substructures in a group of effective drugs?

  3. What Is Frequent Pattern Analysis? • Frequent pattern: a pattern (a set of items, subsequences, substructures, etc.) that occurs frequently in a data set • Applications • Identify motifs in bio-molecules • DNA sequence analysis, protein structure analysis • Identify patterns in micro-arrays • Business applications: • Market basket analysis, cross-marketing, catalog design, sale campaign analysis, etc.

  4. Data • An item is an element (a literal, a variable, a symbol, a descriptor, an attribute, a measurement, etc) • A transaction is a set of items • A data set is a set of transactions • A database is a data set

  5. Customer buys both Customer buys diaper Customer buys beer Association Rules • Itemset X = {x1, …, xk} • Find all the rules X  Ywith minimum support and confidence • support, s, is the probability that a transaction contains X  Y • confidence,c, is the conditional probability that a transaction having X also contains Y • Let supmin = 50%, confmin = 50% • Association rules: • A  C (60%, 100%) • C  A (60%, 75%)

  6. Apriori-based Mining • Generate length (k+1) candidate itemsets from length k frequent itemsets, and • Test the candidates against DB

  7. Challenges of Frequent Pattern Mining • Challenges • Multiple scans of transaction database • Huge number of candidates • Tedious workload of support counting for candidates • Improving Apriori: general ideas • Reduce number of transaction database scans • Shrink number of candidates • Facilitate support counting of candidates

  8. Once both A and D are determined frequent, the counting of AD can begin Once all length-2 subsets of BCD are determined frequent, the counting of BCD can begin 1-itemsets 2-itemsets 1-itemsets … DIC: Reduce Number of Scans ABCD ABC ABD ACD BCD AB AC BC AD BD CD Transactions B C D A Apriori {} Itemset lattice 2-items S. Brin R. Motwani, J. Ullman, and S. Tsur, 1997. DIC 3-items

  9. DHP: Reduce the Number of Candidates • A hashing bucket count <min_sup  every candidate in the buck is infrequent • Candidates: a, b, c, d, e • Hash entries: {ab, ad, ae} {bd, be, de} … • Large 1-itemset: a, b, d, e • The sum of counts of {ab, ad, ae} < min_sup  ab should not be a candidate 2-itemset • J. Park, M. Chen, and P. Yu, 1995

  10. Partition: Scan Database Only Twice • Partition the database into n partitions • Itemset X is frequent  X is frequent in at least one partition • Scan 1: partition database and find local frequent patterns • Scan 2: consolidate global frequent patterns • A. Savasere, E. Omiecinski, and S. Navathe, 1995

  11. Sampling for Frequent Patterns • Select a sample of original database, mine frequent patterns within sample using Apriori • Scan database once to verify frequent itemsets found in sample, only borders of closure of frequent patterns are checked • Example: check abcd instead of ab, ac, …, etc. • Scan database again to find missed frequent patterns • H. Toivonen, 1996

  12. Bottleneck of Frequent-pattern Mining • Multiple database scans are costly • Mining long patterns needs many passes of scanning and generates lots of candidates • To find frequent itemset i1i2…i100 • # of scans: 100 • # of Candidates: • Bottleneck: candidate-generation-and-test • Can we avoid candidate generation?

  13. Set Enumeration Tree • Subsets of I can be enumerated systematically • I={a, b, c, d}  a b c d ab ac ad bc bd cd abc abd acd bcd abcd

  14. a b c d ab ac ad bc bd cd abc abd acd bcd abcd Borders of Frequent Itemsets • Connected • X and Y are frequent and X is an ancestor of Y  all patterns between X and Y are frequent

  15. a b c d ab ac ad bc bd cd abc abd acd bcd abcd Projected Databases • To find a child Xy of X, only X-projected database is needed • The sub-database of transactions containing X • Item y is frequent in X-projected database

  16. Tree-Projection Method • Find frequent 2-itemsets • For each frequent 2-itemset xy, form a projected database • The sub-database containing xy • Recursive mining • If x’y’ is frequent in xy-proj db, then xyx’y’ is a frequent pattern

  17. a b c d ab ac ad bc bd cd abc abd acd bcd abcd Borders and Max-patterns • Max-patterns: borders of frequent patterns • A subset of max-pattern is frequent • A superset of max-pattern is infrequent

  18. MaxMiner: Mining Max-patterns • 1st scan: find frequent items • A, B, C, D, E • 2nd scan: find support for • AB, AC, AD, AE, ABCDE • BC, BD, BE, BCDE • CD, CE, CDE, DE, • Since BCDE is a max-pattern, no need to check BCD, BDE, CDE in later scan • Baya’98 Min_sup=2 Potential max-patterns

  19. Frequent Closed Patterns • For frequent itemset X, if there exists no item y s.t. every transaction containing X also contains y, then X is a frequent closed pattern • “acdf” is a frequent closed pattern • Concise rep. of freq pats • Reduce # of patterns and rules • N. Pasquier et al. In ICDT’99 Min_sup=2

  20. CLOSET: Mining Frequent Closed Patterns • Flist: list of all freq items in support asc. order • Flist: d-a-f-e-c • Divide search space • Patterns having d • Patterns having d but no a, etc. • Find frequent closed pattern recursively • Every transaction having d also has cfa  cfad is a frequent closed pattern • PHM’00 Min_sup=2

  21. Closed and Max-patterns • Closed pattern mining algorithms can be adapted to mine max-patterns • A max-pattern must be closed • Depth-first search methods have advantages over breadth-first search ones

  22. uniform support reduced support Level 1 min_sup = 5% Level 1 min_sup = 5% Milk [support = 10%] Level 2 min_sup = 3% Level 2 min_sup = 5% 2% Milk [support = 6%] Skim Milk [support = 4%] Multiple-level Association Rules • Items often form hierarchy • Flexible support settings: Items at the lower level are expected to have lower support. • Transaction database can be encoded based on dimensions and levels • explore shared multi-level mining

  23. Multi-dimensional Association Rules • Single-dimensional rules: • buys(X, “milk”)  buys(X, “bread”) • MD rules: 2 dimensions or predicates • Inter-dimension assoc. rules (no repeated predicates) • age(X,”19-25”)  occupation(X,“student”)  buys(X,“coke”) • hybrid-dimension assoc. rules (repeated predicates) • age(X,”19-25”)  buys(X, “popcorn”)  buys(X, “coke”) • Categorical Attributes: finite number of possible values, no order among values • Quantitative Attributes: numeric, implicit order

  24. Quantitative/Weighted Association Rules • Numeric attributes are dynamically discretized • maximize the confidence or compactness of the rules • 2-D quantitative association rules: Aquan1 Aquan2  Acat • Cluster “adjacent” association rules to form general rules using a 2-D grid. Income age(X,”33-34”)  income(X,”30K - 50K”)  buys(X,”high resolution TV”) Age

  25. Constraint-based Data Mining • Find all the patterns in a database autonomously? • The patterns could be too many but not focused! • Data mining should be interactive • User directs what to be mined • Constraint-based mining • User flexibility: provides constraints on what to be mined • System optimization: push constraints for efficient mining

  26. Constraints in Data Mining • Knowledge type constraint • classification, association, etc. • Data constraint — using SQL-like queries • find product pairs sold together in stores in New York • Dimension/level constraint • in relevance to region, price, brand, customer category • Rule (or pattern) constraint • small sales (price < $10) triggers big sales (sum >$200) • Interestingness constraint • strong rules: support and confidence

  27. Potential Project Topics • Novel data mining methods • Approximate frequent pattern mining • Mining from unstructured data, such as text and images. • Semi-supervised learning.

  28. Potential Project Topics • Bioinformatics applications • Mining functionally related genes across multiple gene expression datasets • Genome-wide association study • Co-evolution patterns among gene trees.

  29. Potential Project Topics • Netflix Prize • Informational retrieval • Medical informational retrieval

More Related