CSE 634 Data Mining Concepts and Techniques


Published on

1 Comment
  • i want many more like this
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

CSE 634 Data Mining Concepts and Techniques

  1. 1. CSE 634 Data Mining Concepts and Techniques Association Rule Mining Barbara Mucha Tania Irani Irem Incekoy Mikhail Bautin Course Instructor: Prof. Anita Wasilewska State University of New York, Stony Brook Group 6
  2. 2. References <ul><li>Data Mining: Concepts & Techniques by Jiawei Han and Micheline Kamber </li></ul><ul><li>Presentation Slides of Prateek Duble </li></ul><ul><li>Presentation Slides of the Course Book. </li></ul><ul><li>Mining Topic-Specific Concepts and Definitions on the Web </li></ul><ul><li>Effective Personalization Based on Association Rule Discovery from Web Usage Data </li></ul>
  3. 3. Overview <ul><li>Basic Concepts of Association Rule Mining </li></ul><ul><li>Association & Apriori Algorithm </li></ul><ul><li>Paper: Mining Topic-Specific Concepts and Definitions on the Web </li></ul><ul><li>Paper: Effective Personalization Based on Association Rule Discovery from Web Usage Data </li></ul>Barbara Mucha
  4. 4. Outline <ul><li>What is association rule mining? </li></ul><ul><li>Methods for association rule mining </li></ul><ul><li>Examples </li></ul><ul><li>Extensions of association rule </li></ul>Barbara Mucha
  5. 5. What Is Association Rule Mining? <ul><li>Frequent patterns: patterns (set of items, sequence, etc.) that occur frequently in a database </li></ul><ul><li>Frequent pattern mining: finding regularities in data </li></ul><ul><ul><li>What products were often purchased together? </li></ul></ul><ul><ul><ul><li>Beer and diapers?! </li></ul></ul></ul><ul><ul><li>What are the subsequent purchases after buying a car? </li></ul></ul><ul><ul><li>Can we automatically profile customers? </li></ul></ul>Barbara Mucha
  6. 6. Basic Concepts of Association Rule Mining <ul><li>Given: (1) database of transactions, (2) each transaction is a list of items (purchased by a customer in a visit) </li></ul><ul><li>Find: all rules that correlate the presence of one set of items with that of another set of items </li></ul><ul><ul><li>E.g., 98% of people who purchase tires and auto accessories also get automotive services done </li></ul></ul><ul><li>Applications </li></ul><ul><ul><li>*  Maintenance Agreement (What the store should do to boost Maintenance Agreement sales) </li></ul></ul><ul><ul><li>Home Electronics  * (What other products should the store stocks up?) </li></ul></ul><ul><ul><li>Attached mailing in direct marketing </li></ul></ul>Barbara Mucha
  7. 7. Association Rule Definitions <ul><li>Set of items: I={I 1 ,I 2 ,…,I m } </li></ul><ul><li>Transactions: D = {t1, t2,.., tn} be a set of transactions, where a transaction,t, is a set of items </li></ul><ul><li>Itemset: {I i1 ,I i2 , …, I ik }  I </li></ul><ul><li>Support of an itemset: Percentage of transactions which contain that itemset. </li></ul><ul><li>Large (Frequent) itemset: Itemset whose number of occurrences is above a threshold. </li></ul>Barbara Mucha
  8. 8. Rule Measures: Support & Confidence <ul><li>An association rule is of the form : X  Y where X, Y are subsets of I, and X INTERSECT Y = EMPTY </li></ul><ul><li>Each rule has two measures of value, support, and confidence. </li></ul><ul><li>Support indicates the frequencies of the occurring patterns, and confidence denotes the strength of implication in the rule. </li></ul><ul><li>The support of the rule X  Y is support (X UNION Y) c is the CONFIDENCE of rule X  Y if c% of transactions that contain X also contain Y, which can be written as the radio: </li></ul><ul><ul><ul><li>support(X UNION Y)/support(X) </li></ul></ul></ul>Barbara Mucha
  9. 9. Support & Confidence : An Example <ul><li>Let minimum support 50%, and minimum confidence 50%, then we have, </li></ul><ul><ul><li>A  C (50%, 66.6%) </li></ul></ul><ul><ul><li>C  A (50%, 100%) </li></ul></ul>Barbara Mucha
  10. 10. Types of Association Rule Mining <ul><li>Boolean vs. quantitative associations </li></ul><ul><li>(Based on the types of values handled) </li></ul><ul><ul><li>buys(x, “computer”)  buys(x, “financial software”) [.2%, 60%] </li></ul></ul><ul><ul><li>age(x, “30..39”) ^ income(x, “42..48K”)  buys(x, “PC”) [1%, 75%] </li></ul></ul><ul><li>Single dimension vs. multiple dimensional associations </li></ul><ul><ul><li>buys(x, “computer”)  buys(x, “financial software”) [.2%, 60%] </li></ul></ul><ul><ul><li>age(x, “30..39”) ^ income(x, “42..48K”)  buys(x, “PC”) [1%, 75%] </li></ul></ul>Barbara Mucha
  11. 11. Types of Association Rule Mining <ul><li>Single level vs. multiple-level analysis </li></ul><ul><ul><li>What brands of beers are associated with what brands of diapers? </li></ul></ul><ul><li>Various extensions </li></ul><ul><ul><li>Correlation, causality analysis </li></ul></ul><ul><ul><ul><li>Association does not necessarily imply correlation or causality </li></ul></ul></ul><ul><ul><li>Constraints enforced </li></ul></ul><ul><ul><ul><li>E.g., small sales (sum < 100) trigger big buys (sum > 1,000)? </li></ul></ul></ul>Barbara Mucha
  12. 12. Association Discovery <ul><li>Given a user specified minimum support (called MINSUP) and minimum confidence (called MINCONF), an important </li></ul><ul><li>PROBLEM is to find all high confidence, large itemsets (frequent sets, sets with high support). (where support and confidence are larger than minsup and minconf). </li></ul><ul><li>This problem can be decomposed into two subproblems: </li></ul><ul><li>1. Find all large itemsets: with support > minsup (frequent sets). </li></ul><ul><li>2. For a large itemset, X and B  X (or Y  X) , find those rules, X{B} => B ( X-Y  Y) for which confidence > minconf. </li></ul>Barbara Mucha
  13. 13. Basics <ul><li>Itemset: a set of items </li></ul><ul><ul><li>E.g., acm={a, c, m} </li></ul></ul><ul><li>Support of itemsets </li></ul><ul><ul><li>Sup(acm)=3 </li></ul></ul><ul><li>Given min_sup=3, acm is a frequent pattern </li></ul><ul><li>Frequent pattern mining: find all frequent patterns in a database </li></ul>Transaction database TDB Barbara Mucha a , f, c , e, l, p, m , n 500 b, c, k, s, p 400 b, f, h, j, o 300 a , b, c , f, l, m , o 200 f, a , c , d, g, I, m , p 100 Items bought TID
  14. 14. Mining Association Rules—An Example <ul><li>For rule A  C : </li></ul><ul><ul><li>support = support({ A & C }) = 50% </li></ul></ul><ul><ul><li>confidence = support({ A & C })/support({ A }) = 66.6% </li></ul></ul><ul><li>The Apriori principle: </li></ul><ul><ul><li>Any subset of a frequent itemset must be frequent </li></ul></ul>Min. support 50% Min. confidence 50%
  15. 15. Rules from frequent sets <ul><li>X = {mustard, sausage, beer}; frequency = 0.4 </li></ul><ul><li>Y = {mustard, sausage, beer, chips}; frequency = 0.2 </li></ul><ul><li>If the customer buys mustard, sausage, and beer, then the probability that he/she buys chips is 0.5 </li></ul>Barbara Mucha
  16. 16. Applications <ul><li>Mine: </li></ul><ul><ul><li>Sequential patterns </li></ul></ul><ul><ul><ul><li>find inter-transaction patterns such that the presence of a set of items is followed by another item in the time-stamp ordered transaction set. </li></ul></ul></ul><ul><ul><li>Periodic patterns </li></ul></ul><ul><ul><ul><li>It can be envisioned as a tool for forecasting and prediction of the future behavior of time-series data. </li></ul></ul></ul><ul><ul><li>Structural Patterns </li></ul></ul><ul><ul><ul><li>Structural patterns describe how classes and objects can be combined to form larger structures. </li></ul></ul></ul>Barbara Mucha
  17. 17. Application Difficulties <ul><li>Wal-Mart knows that customers who buy Barbie dolls have a 60% likelihood of buying one of three types of candy bars. </li></ul><ul><li>What does Wal-Mart do with information like that? 'I don't have a clue,' says Wal-Mart's chief of merchandising, Lee Scott </li></ul><ul><ul><li>www.kdnuggets.com/news/98/n01.html </li></ul></ul><ul><li>Diapers and beer urban legend </li></ul><ul><ul><li>http://web.onetel.net.uk/~hibou/Beer%20and%20Nappies.html </li></ul></ul>Barbara Mucha
  18. 18. Thank You! Barbara Mucha
  19. 19. CSE 634 Data Mining Concepts and Techniques Association & Apriori Algorithm Tania Irani (105573836) Course Instructor: Prof. Anita Wasilewska State University of New York, Stony Brook
  20. 20. References <ul><li>Data Mining: Concepts & Techniques by Jiawei Han and Micheline Kamber </li></ul><ul><li>Presentation Slides of Prof. Anita Wasilewska </li></ul>
  21. 21. Agenda <ul><li>The Apriori Algorithm (Mining single-dimensional boolean association rules) </li></ul><ul><li>Frequent-Pattern Growth ( FP-Growth ) Method </li></ul><ul><li>Summary </li></ul>
  22. 22. The Apriori Algorithm: Key Concepts <ul><li>K-itemsets: An itemset having k items in it. </li></ul><ul><li>Support or Frequency: Number of transactions that contain a particular itemset. </li></ul><ul><li>Frequent Itemsets: An itemset that satisfies minimum support. (denoted by L k for frequent k-itemset). </li></ul><ul><li>Apriori Property: All non-empty subsets of a frequent itemset must be frequent. </li></ul><ul><li>Join Operation: C k , the set of candidate k-itemsets is generated by joining L k-1 with itself. (L 1 : frequent 1-itemset, L k : frequent k-itemset) </li></ul><ul><li>Prune Operation: L k , the set of frequent k-itemsets is extracted from C k by pruning it – getting rid of all the non-frequent k-itemsets in C k </li></ul><ul><li>Iterative level-wise approach: k-itemsets used to explore (k+1)-itemsets. </li></ul><ul><li>The Apriori Algorithm finds frequent k-itemsets. </li></ul>
  23. 23. How is the Apriori Property used in the Algorithm? <ul><li>Mining single-dimensional Boolean association rules is a 2 step process: </li></ul><ul><ul><li>Using the Apriori Property find the frequent itemsets: </li></ul></ul><ul><ul><ul><li>Each iteration will generate C k (candidate k-itemsets from </li></ul></ul></ul><ul><ul><ul><li>C k-1 ) and L k (frequent k-itemsets) </li></ul></ul></ul><ul><ul><li>Use the frequent k-itemsets to generate association rules. </li></ul></ul>
  24. 24. Finding frequent itemsets using the Apriori Algorithm: Example <ul><li>Consider a database D, consisting of 9 transactions. </li></ul><ul><li>Each transaction is represented by an itemset. </li></ul><ul><li>Suppose min. support required is 2 (2 out of 9 = 2/9 =22 % ) </li></ul><ul><li>Say min. confidence required is 70%. </li></ul><ul><li>We have to first find out the frequent itemset using Apriori Algorithm. </li></ul><ul><li>Then, Association rules will be generated using min. support & min. confidence. </li></ul>I1, I2, I3 T100 I1, I2 ,I3, I5 T100 I1, I3 T100 I2, I3 T100 I1, I3 T100 I1, I2, I4 T100 I2, I3 T100 I2, I4 T100 I1, I2, I5 T100 List of Items TID
  25. 25. Step 1 : Generating candidate and frequent 1-itemsets with min. support = 2 <ul><li>In the first iteration of the algorithm, each item is a member of the set of candidates C k along with its support count. </li></ul><ul><li>The set of frequent 1-itemsets L 1 , consists of the candidate 1-itemsets satisfying minimum support. </li></ul>Scan D for count of each candidate Compare candidate support count with minimum support count C 1 L 1 2 {I5} 2 {I4} 6 {I3} 7 {I2} 6 {I1} Sup.Count Itemset 2 {I5} 2 {I4} 6 {I3} 7 {I2} 6 {I1} Sup.Count Itemset
  26. 26. Step 2 : Generating candidate and frequent 2-itemsets with min. support = 2 Generate C 2 candidates from L 1 x L 1 C 2 C 2 L 2 Scan D for count of each candidate Compare candidate support count with minimum support count Note: We haven’t used Apriori Property yet! {I4, I5} {I3, I5} {I3, I4} {I2, I5} {I2, I4} {I2, I3} {I1, I5} {I1, I4} {I1, I3} {I1, I2} Itemset 1 {I3, I5} 0 {I4, I5} 0 {I3, I4} 2 {I2, I5} 2 {I2, I4} 4 {I2, I3} 2 {I1, I5} 1 {I1, I4} 4 {I1, I3} 4 {I1, I2} Sup. Count Itemset 2 {I2, I5} 2 {I2, I4} 4 {I2, I3} 2 {I1, I5} 4 {I1, I3} 4 {I1, I2} Sup Count Itemset
  27. 27. Step 3 : Generating candidate and frequent 3-itemsets with min. support = 2 C 3 C 3 L 3 Scan D for count of each candidate Compare candidate support count with min support count Generate C 3 candidates from L 2 <ul><li>The generation of the set of candidate 3-itemsets C 3 , involves use of the Apriori Property. </li></ul><ul><li>When Join step is complete, the Prune step will be used to reduce the size of C 3 . Prune step helps to avoid heavy computation due to large C k . </li></ul>Contains non-frequent (2-itemset) subsets {I2, I4, I5} {I2, I3, I5} {I2, I3, I4} {I1, I3, I5} {I1, I2, I5} {I1, I2, I3} Itemset 2 {I1, I2, I5} 2 {I1, I2, I3} Sup. Count Itemset 2 {I1, I2, I5} 2 {I1, I2, I3} Sup Count Itemset
  28. 28. Step 4 : Generating frequent 4-itemset <ul><li>L 3 Join L 3 C 4 = {{I1, I2, I3, I5}} </li></ul><ul><li>This itemset is pruned since its subset {{I2, I3, I5}} is not frequent. </li></ul><ul><li>Thus, C 4 = φ , and the algorithm terminates, having found all of the frequent items. </li></ul><ul><li>This completes our Apriori Algorithm. What’s Next ? </li></ul><ul><li>These frequent itemsets will be used to generate strong association rules (where strong association rules satisfy both minimum support & minimum confidence). </li></ul>
  29. 29. Step 5: Generating Association Rules from frequent k-itemsets <ul><li>Procedure: </li></ul><ul><ul><li>For each frequent itemset l , generate all nonempty subsets of l </li></ul></ul><ul><ul><li>For every nonempty subset s of l , output the rule “ s  ( l - s ) ” if </li></ul></ul><ul><ul><li>support_count( l ) / support_count( s ) ≥ min_conf where min_conf is minimum confidence threshold. 70% in our case. </li></ul></ul><ul><li>Back To Example: </li></ul><ul><ul><li>Lets take l = {I1,I2,I5} </li></ul></ul><ul><ul><li>The nonempty subsets of Lets take l are {I1,I2}, {I1,I5}, {I2,I5}, {I1}, {I2}, {I5} </li></ul></ul>
  30. 30. Step 5: Generating Association Rules from frequent k-itemsets [Cont.] <ul><li>The resulting association rules are: </li></ul><ul><ul><li>R1: I1 ^ I2  I5 </li></ul></ul><ul><ul><ul><li>C onfidence = sc{I1,I2,I5} / sc{I1,I2} = 2/4 = 50% </li></ul></ul></ul><ul><ul><ul><li>R1 is Rejected. </li></ul></ul></ul><ul><ul><li>R2: I1 ^ I5  I2 </li></ul></ul><ul><ul><ul><li>Confidence = sc{I1,I2,I5} / sc{I1,I5} = 2/2 = 100% </li></ul></ul></ul><ul><ul><ul><li>R2 is Selected. </li></ul></ul></ul><ul><ul><li>R3: I2 ^ I5  I1 </li></ul></ul><ul><ul><ul><li>Confidence = sc{I1,I2,I5} / sc{I2,I5} = 2/2 = 100% </li></ul></ul></ul><ul><ul><ul><li>R3 is Selected. </li></ul></ul></ul>
  31. 31. Step 5: Generating Association Rules from Frequent Itemsets [Cont.] <ul><ul><li>R4: I1  I2 ^ I5 </li></ul></ul><ul><ul><ul><li>Confidence = sc{I1,I2,I5} / sc{I1} = 2/6 = 33% </li></ul></ul></ul><ul><ul><ul><li>R4 is Rejected. </li></ul></ul></ul><ul><ul><li>R5: I2  I1 ^ I5 </li></ul></ul><ul><ul><ul><li>Confidence = sc{I1,I2,I5} / {I2} = 2/7 = 29% </li></ul></ul></ul><ul><ul><ul><li>R5 is Rejected. </li></ul></ul></ul><ul><ul><li>R6: I5  I1 ^ I2 </li></ul></ul><ul><ul><ul><li>Confidence = sc{I1,I2,I5} / {I5} = 2/2 = 100% </li></ul></ul></ul><ul><ul><ul><li>R6 is Selected. </li></ul></ul></ul><ul><ul><li>We have found three strong association rules. </li></ul></ul>
  32. 32. Agenda <ul><li>The Apriori Algorithm (Mining single dimensional boolean association rules) </li></ul><ul><li>Frequent-Pattern Growth (FP-Growth) Method </li></ul><ul><li>Summary </li></ul>
  33. 33. Mining Frequent Patterns Without Candidate Generation <ul><li>Compress a large database into a compact, Frequent-Pattern tree (FP-tree) structure </li></ul><ul><ul><li>Highly condensed , but complete for frequent pattern mining </li></ul></ul><ul><ul><li>Avoid costly database scans </li></ul></ul><ul><li>Develop an efficient , FP-tree-based frequent pattern mining method </li></ul><ul><ul><li>A divide-and-conquer methodology: </li></ul></ul><ul><ul><ul><li>Compress DB into FP-tree, retain itemset associations </li></ul></ul></ul><ul><ul><ul><li>Divide the new DB into a set of conditional DBs – each associated with one frequent item </li></ul></ul></ul><ul><ul><ul><li>Mine each such database seperately </li></ul></ul></ul><ul><ul><li>Avoid candidate generation </li></ul></ul>
  34. 34. FP-Growth Method : An Example <ul><li>Consider the previous example of a database D, consisting of 9 transactions. </li></ul><ul><li>Suppose min. support count required is 2 (i.e. min_sup = 2/9 = 22 % ) </li></ul><ul><li>The first scan of the database is same as Apriori, which derives the set of 1-itemsets & their support counts. </li></ul><ul><li>The set of frequent items is sorted in the order of descending support count. </li></ul><ul><li>The resulting set is denoted as L = {I2:7, I1:6, I3:6, I4:2, I5:2} </li></ul>I1, I2, I3 T100 I1, I2 ,I3, I5 T100 I1, I3 T100 I2, I3 T100 I1, I3 T100 I1, I2, I4 T100 I2, I3 T100 I2, I4 T100 I1, I2, I5 T100 List of Items TID
  35. 35. FP-Growth Method: Construction of FP-Tree <ul><li>First, create the root of the tree, labeled with “ null ”. </li></ul><ul><li>Scan the database D a second time (First time we scanned it to create 1-itemset and then L), this will generate the complete tree. </li></ul><ul><li>The items in each transaction are processed in L order (i.e. sorted order). </li></ul><ul><li>A branch is created for each transaction with items having their support count separated by colon. </li></ul><ul><li>Whenever the same node is encountered in another transaction, we just increment the support count of the common node or Prefix. </li></ul><ul><li>To facilitate tree traversal, an item header table is built so that each item points to its occurrences in the tree via a chain of node-links. </li></ul><ul><li>Now, The problem of mining frequent patterns in database is transformed to that of mining the FP-Tree. </li></ul>
  36. 36. FP-Growth Method: Construction of FP-Tree <ul><li>An FP-Tree that registers compressed, frequent pattern information </li></ul>I2:7 null{} I1:2 I1:4 I3:2 I4:1 I3:2 I5:1 I5:1 I3:2 I4:1 Node-link Sup Count Item Id 2 I5 2 I4 6 I3 6 I1 7 I2
  37. 37. Mining the FP-Tree by Creating Conditional (sub) pattern bases <ul><li>Start from each frequent length-1 pattern (as an initial suffix pattern). </li></ul><ul><li>Construct its conditional pattern base which consists of the set of prefix paths in the FP-Tree co-occurring with suffix pattern. </li></ul><ul><li>Then, construct its conditional FP-Tree & perform mining on this tree. </li></ul><ul><li>The pattern growth is achieved by concatenation of the suffix pattern with the frequent patterns generated from a conditional FP-Tree. </li></ul><ul><li>The union of all frequent patterns (generated by step 4) gives the required frequent itemset. </li></ul>
  38. 38. FP-Tree Example Continued <ul><li>Now, following the above mentioned steps: </li></ul><ul><li>Lets start from I5. I5 is involved in 2 branches namely {I2 I1 I5: 1} and {I2 I1 I3 I5: 1}. </li></ul><ul><li>Therefore considering I5 as suffix, its 2 corresponding prefix paths would be {I2 I1: 1} and {I2 I1 I3: 1}, which forms its conditional pattern base. </li></ul>Mining the FP-Tree by creating conditional (sub) pattern bases I2 I1: 4 <I2: 4> {(I2: 4)} I1 I2 I3:4, I1 I3: 2 , I2 I1 I3: 2 <I2: 4, I1: 2>,<I1:2> {(I2 I1: 2),(I2: 2), (I1: 2)} I3 I2 I4: 2 <I2: 2> {(I2 I1: 1),(I2: 1)} I4 I2 I5:2, I1 I5:2, I2 I1 I5: 2 <I2:2 , I1:2> {(I2 I1: 1),(I2 I1 I3: 1)} I5 Frequent pattern generated Conditional FP-Tree Conditional pattern base Item
  39. 39. FP-Tree Example Continued <ul><li>Out of these, only I1 & I2 is selected in the conditional FP-Tree because I3 does not satisfy the minimum support count. </li></ul><ul><li>For I1, support count in conditional pattern base = 1 + 1 = 2 </li></ul><ul><li>For I2, support count in conditional pattern base = 1 + 1 = 2 </li></ul><ul><li>For I3, support count in conditional pattern base = 1 </li></ul><ul><li>Thus support count for I3 is less than required min_sup which is 2 here. </li></ul><ul><li>Now, we have a conditional FP-Tree with us. </li></ul><ul><li>All frequent pattern corresponding to suffix I5 are generated by considering all possible combinations of I5 and conditional FP-Tree. </li></ul><ul><li>The same procedure is applied to suffixes I4, I3 and I1. </li></ul><ul><li>Note: I2 is not taken into consideration for suffix because it doesn’t have any prefix at all. </li></ul>
  40. 40. Why Frequent Pattern Growth Fast ? <ul><li>Performance study shows </li></ul><ul><ul><li>FP-growth is an order of magnitude faster than Apriori </li></ul></ul><ul><li>Reasoning </li></ul><ul><ul><li>No candidate generation, no candidate test </li></ul></ul><ul><ul><li>Use compact data structure </li></ul></ul><ul><ul><li>Eliminate repeated database scans </li></ul></ul><ul><ul><li>Basic operation is counting and FP-tree building </li></ul></ul>
  41. 41. Agenda <ul><li>The Apriori Algorithm (Mining single dimensional boolean association rules) </li></ul><ul><li>Frequent-Pattern Growth ( FP-Growth ) Method </li></ul><ul><li>Summary </li></ul>
  42. 42. Summary <ul><li>Association rules are generated from frequent itemsets . </li></ul><ul><li>Frequent itemsets are mined using Apriori algorithm or Frequent-Pattern Growth method. </li></ul><ul><li>Apriori property states that all the subsets of frequent itemsets must also be frequent. </li></ul><ul><li>Apriori algorithm uses frequent itemsets, join & prune methods and Apriori property to derive strong association rules. </li></ul><ul><li>Frequent-Pattern Growth method avoids repeated database scanning of Apriori algorithm. </li></ul><ul><li>FP-Growth method is faster than Apriori algorithm . </li></ul>
  43. 43. Thank You!
  44. 44. Mining Topic-Specific Concepts and Definitions on the Web Irem Incekoy May 2003,  Proceedings of the 12th International conference on World Wide Web, ACM Press Bing Liu , University of Illinois at Chicago, 851 S. Morgan Street Chicago IL 60607-7053 Chee Wee Chin, Hwee Tou Ng , National University of Singapore 3 Science Drive 2 Singapore
  45. 45. References <ul><li>Agrawal, R. and Srikant, R. “Fast Algorithm for Mining Association Rules”, VLDB-94, 1994. </li></ul><ul><li>Anderson, C. and Horvitz, E. “Web Montage: A Dynamic Personalized Start Page”, WWW-02, 2002. </li></ul><ul><li>Brin, S. and Page, L. “The Anatomy of a Large-Scale Hypertextual Web Search Engine”, WWW7, 1998. </li></ul>
  46. 46. Introduction <ul><li>When one wants to learn about a topic, one reads a book or a survey paper. </li></ul><ul><li>One can read the research papers about the topic. </li></ul><ul><li>None of these is very practical. </li></ul><ul><li>Learning from web is convenient, intuitive, and diverse. </li></ul>
  47. 47. Purpose of the Paper <ul><li>This paper’s task is “mining topic-specific knowledge on the Web”. </li></ul><ul><li>The goal is to help people learn in-depth knowledge of a topic systematically on the Web. </li></ul>
  48. 48. Learning about a New Topic <ul><li>One needs to find definitions and descriptions of the topic. </li></ul><ul><li>One also needs to know the sub-topics and salient concepts of the topic. </li></ul><ul><li>Thus, one wants the knowledge as presented in a traditional book. </li></ul><ul><li>The task of this paper can be summarized as “compiling a book on the Web”. </li></ul>
  49. 49. Proposed Technique <ul><li>First, identify sub-topics or salient concepts of that specific topic. </li></ul><ul><li>Then, find and organize the informative pages containing definitions and descriptions of the topic and sub-topics. </li></ul>
  50. 50. Why are the current search tecnhiques not sufficient? <ul><li>For definitions and descriptions of the topic: </li></ul><ul><li>Existing search engines rank web pages based on keyword matching and hyperlink structures. NOT very useful for measuring the informative value of the page. </li></ul><ul><li>For sub-topics and salient concepts of the topic: </li></ul><ul><li>A single web page is unlikely to contain information about all the key concepts or sub-topics of the topic. Thus, sub-topics need to be discovered from multiple web pages. Current search engine systems do not perform this task. </li></ul>
  51. 51. Related Work <ul><li>Web information extraction wrappers </li></ul><ul><li>Web query languages </li></ul><ul><li>User preference approach </li></ul><ul><li>Question answering in information retrieval </li></ul><ul><li>Question answering is a closely-related work to this paper. The objective of a question-answering system is to provide direct answers to questions submitted by the user. In this paper’s task, many of the questions are about definitions of terms. </li></ul>
  52. 52. The Algorithm <ul><li>WebLearn (T) </li></ul><ul><li>1) Submit T to a search engine, which returns a set of relevant pages </li></ul><ul><li>2) The system mines the sub-topics or salient concepts of T using a set S of top ranking pages from the search engine </li></ul><ul><li>3) The system then discovers the informative pages containing definitions of the topic and sub-topics (salient concepts) from S </li></ul><ul><li>4) The user views the concepts and informative pages. </li></ul><ul><li>If s/he still wants to know more about sub-topics then </li></ul><ul><li>for each user-interested sub-topic T i of T do </li></ul><ul><li>WebLearn (T i ); </li></ul>
  53. 53. Sub-Topic or Salient Concept Discovery <ul><li>Observation: </li></ul><ul><li>Sub-topics or salient concepts of a topic are important word phrases, usually emphasized using some HTML tags (e.g., <h1>,...,<h4>,<b>). </li></ul><ul><li>However, this is not sufficient. Data mining techniques are able to help to find the frequent occurring word phrases. </li></ul>
  54. 54. Sub-Topic Discovery <ul><li>After obtaining a set of relevant top-ranking pages (using Google), sub-topic discovery consists of the following 5 steps. </li></ul><ul><li>1) Filter out the “noisy” documents that rarely contain sub-topics or salient-concepts. The resulting set of documents is the source for sub-topic discovery. </li></ul>
  55. 55. Sub-Topic Discovery <ul><li>2) Identify important phrases in each page (discover phrases emphasized by HTML markup tags). </li></ul><ul><li>Rules to determine if a markup tag can safely be ignored </li></ul><ul><li>Contains a salutation title (Mr, Dr, Professor). </li></ul><ul><li>Contains an URL or an email address. </li></ul><ul><li>Contains terms related to a publication (conference, proceedings, journal). </li></ul><ul><li>Contains an image between the markup tags. </li></ul><ul><li>Too lengthy (the paper uses 15 words as the upper limit) </li></ul>
  56. 56. Sub-Topic Discovery <ul><li>Also, in this step, some preprocessing techniques such as stopwords removal and word stemming are applied in order to extract quality text segments. </li></ul><ul><li>Stopwords removal: Eliminating the words that occur too frequently and have little informational meaning. </li></ul><ul><li>Word stemming: Finding the root form of a word by removing its suffix. </li></ul>
  57. 57. Sub-Topic Discovery <ul><li>3) Mine frequent occurring phrases: </li></ul><ul><li>- Each piece of text extracted in step 2 is stored in a dataset called a transaction set . </li></ul><ul><li>- Then, an association rule miner based on Apriori algorithm is executed to find those frequent itemsets. In this context, an itemset is a set of words that occur together, and an itemset is frequent if it appears in more than two documents. </li></ul><ul><li>- We only need the first step of the Apriori algorithm and we only need to find frequent itemsets with three words or fewer (this restriction can be relaxed). </li></ul>
  58. 58. Sub-Topic Discovery <ul><li>4) Eliminate itemsets that are unlikely to be sub-topics, and determine the sequence of words in a sub-topic. (postprocessing) </li></ul><ul><li>Heuristic: If an itemset does not appear alone as an important phrase in any page, it is unlikely to be a main sub-topic and it is removed. </li></ul>
  59. 59. Sub-Topic Discovery <ul><li>5) Rank the remaining itemsets. The remaining itemsets are regarded as the sub-topics or salient concepts of the search topic and are ranked based on the number of pages that they occur. </li></ul>
  60. 60. Definition Finding <ul><li>This step tries to identify those pages that include definitions of the search topic and its sub-topics discovered in the previous step. </li></ul><ul><li>Preprocessing steps: </li></ul><ul><li>Texts that will not be displayed by browsers (e.g., <script>...</ script >,<!—comments-->) are ignored. </li></ul><ul><li>Word stemming is applied. </li></ul><ul><li>Stopwords and punctuation are kept as they serve as clues to identify definitions. </li></ul><ul><li>HTML tags within a paragraph are removed. </li></ul>
  61. 61. Definition Finding <ul><li>After that, following patterns are applied to identify definitions: </li></ul>[1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web
  62. 62. Definition Finding <ul><li>Besides using the above patterns, the paper also relies on HTML structuring and hyperlink structures. </li></ul><ul><li>1) If a page contains only one header or one big emphasized text segment at the beginning in the entire document, then the document contains a definition of the concept in the header. </li></ul><ul><li>2) Definitions at the second level of the hyperlink structure are also discovered. All the patterns and methods described above are applied to these second level documents. </li></ul>
  63. 63. Definition Finding <ul><li>Observation: Sometimes no informative page is found for a particular sub-topic when the pages for the main topic are very general and do not contain detailed information for sub-topics. </li></ul><ul><li>In such cases, the sub-topic can be submitted to the search engine and sub-subtopics may be found recursively. </li></ul>
  64. 64. Dealing with Ambiguity <ul><li>One of the difficult problems in concept mining is the ambiguity of the search terms (e.g., classification). </li></ul><ul><li>A search engine may not return any page in the right context in its top ranking pages. </li></ul><ul><li>Partial solution: adding terms that can represent the context (e.g., classification data mining). </li></ul><ul><li>Disadvantage: returned web pages focus more on the context words since they represent a larger concept. </li></ul>
  65. 65. Dealing with Ambiguity <ul><li>To handle this problem: First reduce the ambiguity of a search topic by using context words. Then, </li></ul><ul><li>1) Finding salient concepts only in the segment describing the topic or sub-topic. (using HTML structuring tags as cues). </li></ul><ul><li>2) Identifying those pages that hierarchically organize knowledge of the parent topic. To identify such pages, we can parse the HTML nested list items (e.g., <li>) structure by building a tree. </li></ul>
  66. 66. Dealing with Ambiguity An example of a well-organized topic hierarchy <ul><li>We confirm whether it is a correct page by finding if </li></ul><ul><li>the hierarchy contains at least another sub-topic of </li></ul><ul><li>the parent topic. </li></ul>[1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web
  67. 67. Dealing with Ambiguity <ul><li>Finding salient concepts enclosed within braces illustrating examples. </li></ul><ul><li>Example: </li></ul><ul><li>There are many clustering approaches (e.g., hierarchical, partitioning, k-means, k-medoids ), and we add that efficiency is important if the clusters contain many points. </li></ul><ul><li>The execution of the algorithm can stop when most of the salient concepts found are parallel concepts of the search topic. </li></ul>
  68. 68. Mutual Reinforcement <ul><li>This method applies to situations where we have already found the sub-topics of a topic, and we want to find the salient concepts of the sub-topics of the topic, to go down further. </li></ul><ul><li>Often, when one searches for a sub-topic S 1, one also finds important information about another sub-topic S 2 due to the ranking algorithm used by the search engine. </li></ul><ul><li>This method works in two steps: </li></ul><ul><li>1) submit each sub-topic individually to the search engine. </li></ul><ul><li>2) combine the top-ranking pages from each search into one set, and apply the proposed techniques to the whole set to look for all sub-topics. </li></ul>
  69. 69. System Architecture <ul><li>The overall system is composed of five main components: </li></ul><ul><li>A search engine: This is a standard web search engine (Google is used in this system). </li></ul><ul><li>A crawler: It crawls the World Wide Web to download those top-ranking pages returned by the search engine. It stores the pages in “Web Page Depository”. </li></ul><ul><li>A salient concept miner: It uses the sub-topic discovery techniques explained before to search the pages stored in “Web Page Depository”, in order to identify and extract those sub-topics and salient concepts. </li></ul>
  70. 70. System Architecture <ul><li>4) A definition finder: It uses the technique presented in definition finding section to search through the pages stored in “Web Page Depository” to find those informative pages containing definitions of the topics and the sub-topics. </li></ul><ul><li>5) A user interface: It enables the user to interact with the system </li></ul>
  71. 71. System Architecture [1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web
  72. 72. Experimental Study <ul><li>The size of the set of documents is limited to the first hundred results returned by Google. </li></ul><ul><li>Table 1 shows the sub-topics and salient concepts discovered for 28 search topics </li></ul><ul><li>In each box, the first line gives the search topic. For each topic, only ten top-ranking concepts are listed. </li></ul><ul><li>For too specific topics, only definition finding is meaningful. </li></ul><ul><li>[1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web </li></ul>
  73. 75. Experimental Study <ul><li>In Table 2, the precision of the definition-finding task is compared with the Google search engine and AskJeeves, the web’s premier question-answering system. </li></ul><ul><li>The first 10 pages of results are compared with the first 10 pages returned by Google and AskJeeves. To do a fair comparison, they also look for definitions in the second level of the search results returned by Google and AskJeeves. </li></ul><ul><li>[1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web </li></ul>
  74. 76. Table 2
  75. 77. Experimental Study <ul><li>Table 3 presents the results for ambiguity handling by applying the respective methods explained before. </li></ul><ul><li>Column 1 lists two ambiguous topics of “data mining” and “time series”. Column 2 lists the sub-topics identified using the original technique. </li></ul><ul><li>Column 3 lists gives the sub-topics discovered using the respective parent-topics as context terms. </li></ul><ul><li>Column 4 uses ambiguity handling techniques. Column 5 applies mutual reinforcement in addition to others. </li></ul><ul><li>[1] Bing Liu, Chee Wee Chin, Hwee Tou Ng. Mining Topic-Specific Concepts and Definitions on the Web </li></ul>
  76. 80. Conclusions <ul><li>The proposed techniques aim at helping Web users to learn an unfamiliar topic in-depth and systematically. </li></ul><ul><li>This is an efficient system to discover and organize knowledge on the web, in a way similar to a traditional book, to assist learning. </li></ul>
  77. 81. Effective Personalization Based on Association Rule Discovery from Web Usage Data Mikhail Bautin Bamshad Mobasher, Honghua Dai, Tao Luo, Miki Nakagawa DePaul University 243 S. Wabash Ave. Chicago, Illinois 60604, USA (2001)
  78. 82. References <ul><li>B. Mobasher, H. Dai, T. Luo and M. Nakagawa: &quot;Effective Personalization Based on Association Rule Discovery from Web Usage Data&quot;, in Proc. the 3rd ACM Workshop on Web Information and Data Management (WIDM01) (2001). </li></ul><ul><li>R. Agarwal, C. Aggarwal, and V. Prasad. A tree projection algorithm for generation of frequent itemsets. In Proceedings of the High Performance Data Mining Workshop , Puerto Rico, 1999. </li></ul><ul><li>R. Agrawal and Ramakrishnan Srikant. Fast algorithms for mining association rules. In Proc. 20th Int. Conference on Very Large Data Bases, VLDB94 , 1994. </li></ul>
  79. 83. Goal <ul><li>Personalize a web site: </li></ul><ul><ul><li>Predict actions of the user (pre-fetching etc.) </li></ul></ul><ul><ul><li>Recommend new items to a customer based on viewed items and knowledge of what other customers are interested in: </li></ul></ul><ul><ul><li>“Customers who buy this also buy that...” </li></ul></ul>
  80. 84. Approaches <ul><li>Collaborative filtering </li></ul><ul><ul><li>Find top k users who have similar tastes or interests (k-nearest-neighbor) </li></ul></ul><ul><ul><li>Predict actions based on what those users did </li></ul></ul><ul><ul><li>Too much online computation needed </li></ul></ul><ul><li>Association rules </li></ul><ul><ul><li>Scalable: constant time query processing </li></ul></ul><ul><ul><li>Better precision and coverage than CF </li></ul></ul>
  81. 85. Data Preparation <ul><li>Input: web server logs </li></ul><ul><li>Steps: </li></ul><ul><ul><li>User identification (trivial if using cookies) </li></ul></ul><ul><ul><li>Session and transaction identification </li></ul></ul><ul><ul><li>Page view identification (for multi-frame sites) </li></ul></ul><ul><li>As a result of preparation: </li></ul><ul><ul><li>Records correspond to transactions </li></ul></ul><ul><ul><li>Items correspond to page views </li></ul></ul><ul><ul><li>Order of page views does not matter </li></ul></ul>
  82. 86. Pattern Discovery <ul><li>Running Apriori algorithm </li></ul><ul><ul><li>Records = transactions, items = page views </li></ul></ul><ul><ul><li>Minimum support and confidence restriction </li></ul></ul><ul><ul><li>Problem with global minimum support value: </li></ul></ul><ul><ul><li>important but rare items can be discarded </li></ul></ul><ul><ul><li>Solution: multiple minimum support values. For itemset {p 1 , ..., p n } require </li></ul></ul>
  83. 87. Recommendation Engine <ul><li>Fixed-size sliding window w: </li></ul><ul><li>subset of | w | most recent page views </li></ul><ul><li>Need to find rules with w on the left </li></ul><ul><li>This is done with depth-first search </li></ul><ul><li>Sort elements of w lexicographically </li></ul><ul><li>Only need O(|w|) to find the itemset and O(# of page views) to produce recommendations </li></ul>
  84. 88. Frequent Itemset Graph <ul><li>Figure 1 from the paper (Mobasher et al.) </li></ul>
  85. 89. Example <ul><li>Active session window w = {B, E} </li></ul><ul><li>Solid lines – “lexicographic” extension </li></ul><ul><li>Stippled lines – any extension </li></ul><ul><li>The search leads to node BE (5) at level 3 </li></ul><ul><li>Possible extensions: A and C </li></ul><ul><li>Confidence calculated as </li></ul><ul><li>For A it is 5/5 = 1, for C it is 4/5 </li></ul>
  86. 90. Window size vs minsup <ul><li>For large window size it might be difficult to find frequent enough itemsets </li></ul><ul><li>But larger window gives better accuracy </li></ul><ul><li>Solution: the “ all-kth-order ” method </li></ul><ul><ul><li>Start with the largest possible window size </li></ul></ul><ul><ul><li>Reduce window size until able to generate a recommendation </li></ul></ul><ul><ul><li>No additional computation incurred </li></ul></ul>
  87. 91. Evaluation Methodology <ul><li>For each transaction t first n page views are used for generating recommendation and last |t| - n are used for testing </li></ul><ul><li>as t – subset of first n elements of t </li></ul><ul><li> – minimum required confidence </li></ul><ul><li>R(as t ,  ) – set of recommendations </li></ul><ul><li>eval t – the last |t| - n pageviews of t </li></ul>
  88. 92. Measures of Evaluation <ul><li>The threshold  is ranging from 0.1 to 1 </li></ul>
  89. 93. Impact of Window Size <ul><li>Figure 2 from the paper (Mobasher et al.) </li></ul>
  90. 94. Single vs Multiple Min. Support <ul><li>Figure 3 from the paper (Mobasher et al.) </li></ul>
  91. 95. The all- k th-order Model <ul><li>Figure 4 from the paper (Mobasher et al.) </li></ul>
  92. 96. Association Rules vs k NN <ul><li>Figure 5 from the paper (Mobasher et al.) </li></ul>
  93. 97. Conclusions <ul><li>Personalization based on association rules is better than k-nearest-neighbor approach: </li></ul><ul><ul><li>Faster – very little online computation </li></ul></ul><ul><ul><li>Therefore, better scalability </li></ul></ul><ul><ul><li>Better precision </li></ul></ul><ul><ul><li>Better coverage </li></ul></ul><ul><li>Effective alternative to standard collaborative filtering mechanisms for personalization </li></ul>
  94. 98. Thank you!