1 / 12

Understanding Association Rule Mining: The Apriori Algorithm for Market Basket Analysis

This tutorial explores association rule mining with a focus on the Apriori algorithm. The goal is to identify rules that meet user-defined minimum support (minsup) and minimum confidence (minconf). Initially applied in market basket analysis, this method finds relationships among purchased items using categorical data. The Apriori algorithm consists of two main steps: identifying frequent itemsets and generating association rules. We illustrate the process with supermarket transaction examples and suggest implementation in Weka for practical application.

ania
Télécharger la présentation

Understanding Association Rule Mining: The Apriori Algorithm for Market Basket Analysis

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. Tutorial 4

  2. Association rule mining • Goal: Find all rules that satisfy the user-specified minimum support (minsup) and minimum confidence(minconf). • Assume all data are categorical. • No good algorithm for numeric data. • Initially used for Market Basket Analysis to find how items purchased by customers are related.

  3. Association rule IF A B Support (AB)= #of tuples containing both (A,B) Total # of tuples • IF A B • Confidence (AB)= #of tuples containing both (A,B) Total # of tuples containing A

  4. The Apriori algorithm • The best known algorithm. • Two steps: • Find all itemsets that have minimum support (frequent itemsets, also called large itemsets). • Use frequent itemsets to generate rules.

  5. Example • Five transactions from a supermarket

  6. Minimum support • Minimum support=2/5= 40%

  7. example

  8. example {Egg, Milk} , {Egg, butter}  {Egg,Milk,butter} After that check all possible pairs in L2: {Egg,Milk}  ok {Egg,Butter}  ok {Milk,butter}  No Remove it

  9. cont • Minimum support=2/5= 40% min confidence=70%

  10. Results • Egg  Butter Support: 60% confidence:75% • Butter  Egg Support: 60% confidence:75% • Milk  Egg Support: 40% confidence:100% • Baby Powder  Butter Support: 40% confidence:100%

  11. Insert the same example to weka. • Try the same example in Weka, insert marketing-list.csv

  12. Reference: • “Association Rules Apriori Algorithm”, https://dspace.ist.utl.pt/bitstream/2295/55704/1/licao_9.pdf

More Related