1 / 23

Chapter 14 – Association Rules

Chapter 14 – Association Rules. DM for Business Intelligence. What are Association Rules?. Study of “what goes with what” “Customers who bought X also bought Y” What symptoms go with what diagnosis Transaction-based or event-based Also called “market basket analysis” and “affinity analysis”

ialbanese
Download Presentation

Chapter 14 – Association Rules

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. Chapter 14 – Association Rules DM for Business Intelligence

  2. What are Association Rules? • Study of “what goes with what” • “Customers who bought X also bought Y” • What symptoms go with what diagnosis • Transaction-based or event-based • Also called “market basket analysis” and “affinity analysis” • Originated with study of customer transactions databases to determine associations among itemspurchased • Example of Unsupervised Learning

  3. Used in many recommender systems

  4. Generating Rules

  5. Terms “IF” part = antecedent, represented by “(a)” “THEN” part = consequent, represented by “(c)” “Item set” = the items (e.g., products) comprising the antecedent and consequent, represented by “(a U c)” • Antecedent and consequent are disjoint(i.e., have no items in common) For example, you wouldn’t say “customers bought beer and beer”

  6. Tiny Example: Phone Cases/Faceplates

  7. Many Rules are Possible For example: Transaction 1 supports several rules, such as • “If red, then white” (“If a red faceplate is purchased, then so is a white one”) • “If white, then red” • “If red and white, then green” • + several more

  8. Frequent Item Sets • Ideally, we want to create all possible combinations of items • Problem: computation time grows exponentially as number of combinations increases • Solution: consider only “frequent item sets” • Criterion for frequent: Support

  9. Support Support = Count (or percent) of total transactions that include an Item or Item Set • Support(a) • Support(c) • Support(a U c) Example: support for the Item Set {red, white} is 4 out of 10 transactions, or 40%

  10. Tiny Example: Phone Cases/Faceplates Support for rule: “If Red, then White” Support = 4/10 or 40%

  11. Apriori Algorithm

  12. Generating Frequent Item Sets For k products… • User sets a minimum support criterion • Next, generate list of one-item sets that meet the support criterion • Use the list of one-item sets to generate list of two-item sets that meet the support criterion • Use list of two-item sets to generate list of three-item sets • Continue up through k-item sets

  13. Measures of Performance Support: = count or % of total transactions that include an Item or Item Set. Ex, Support(a), Support(c), or Support (a U c) Confidence = % of antecedent (IFs) transactions that also have the consequent (THEN) item set (“within sets” measure . . . IF and THENs / IFs) Or Support(a U c) / Support(a) Benchmark Confidence= transactions with consequent as % of all transactions (THENs / Total Records in Data) Or Support(c) / Total Records Lift = Confidence / Benchmark Confidence • Lift > 1 indicates a rule that is useful in finding consequent items sets (i.e., more useful than just selecting transactions randomly)

  14. Tiny Example: Phone Cases/Faceplates Analyzing the rule: “If Red, then White” Confidence = 4/5 or 80%

  15. Analyzing the rule: “If Red, then White” Tiny Example: Phone Cases/Faceplates Confidence = 4/5 or 80%

  16. Tiny Example: Phone Cases/Faceplates Analyzing the rule: “If Red, then White” Confidence = 4/5 or 80% Benchmark Confidence = 8/10 or 80% Lift = 80%  80% = 1 (not greater than 1, so not good lift)

  17. Select Rules with Confidence Generate all rules that meet specified support & confidence • Find frequent item sets (those with sufficient support – see above) • From these item sets, generate rules with sufficient confidence

  18. Alternate Data Format: Binary Matrix Analyzing the rule: “If Red and White, then Green” (Antecedent = a) (Consequent = c) IF Red and White, THEN Green = 2 (a U c) = 2  4 or 50% Confidence IF Red and White = 4 (a)

  19. Example: Rules from {red, white, green} • {red, white}  {green} with confidence = 2/4 = 50% [(support {red, white, green})/(support {red, white})] • {red, green}  {white} with confidence = 2/2 = 100% [(support {red, white, green})/(support {red, green})] Plus 4 more with confidence of 100%, 33%, 29% & 100% If confidence criterion is 70%, report only rules 2, 3 and 6

  20. All Rules (XLMiner Output) “THEN” “IF” 1 2 3 4 5 6 50 100 100 33 29 100 Red, White => Red, Green => White, Green => Red => White => Green => Green White Red White, Green Red, Green Red, White 4 2 2 6 7 2 2 7 6 2 2 4 2 2 2 2 2 2 2.5 1.4 1.7 1.7 1.5 2.5 Benchmark Confidence =Support(c) / Total Records (e.g., 10 records) Lift Ratio= Confidence / Benchmark Confidence Confidence = Support(a U c) /Support(a)

  21. Interpretation • Lift ratio shows how effective the rule is in finding consequents (useful if finding particular consequents is important) • Confidence shows the rate at which consequents will be found (useful in learning costs of promotion) • Support measures overall impact

  22. Caution: The Role of Chance Random data can generate apparently interesting association rules The more rules you produce, the greater this danger Rules based on large numbers of records are less subject to this danger

  23. Summary • Association rules (or affinity analysis, or market basket analysis) produce rules on among items from a database of transactions • Is Unsupervised Learning • Widely used in recommender systems • Most popular method is Apriori algorithm • To reduce computation, we consider only “frequent” item sets • Performance is measured by confidence and lift • Can produce too many rules; review is required to identify useful rules and to reduce redundancy

More Related