➢ Association Rules ➢ Different measures to validate rules ➢ Support ➢ Confidence ➢ Lift ➢ Leverage ➢ Methods / Algorithms used for complex scenarios ➢ Apriori Algorithm, FP-growth Algorithm, Eclat Algorithm ➢ Demo of an association rule implementation using python notebook Accelerate AI >>> AAI
Learning Supervised Learning Reinforcement Learning Algorithms that “learn” from un-labelled data Clustering Association Anomaly Detection Recommendation Grouping by certain behavior People who buy X tend to buy Y People who buy P+Q tend to buy R
we place detergents in our store to maximize sales ✓ Are window cleaning products purchased when people buy detergents and orange juice ✓ Are canned soft drinks purchased with bananas? Does the brand of canned soft drink make a difference? ✓ How are the demographics of the neighborhood impacting what customers are buying? What combination of products are usually brought together? Accelerate AI >>> AAI
Market basket transactions For illustration purposes only A frequent item-set {Diaper, Beer} Item-set Total no. of unique items = 6 There are 2^t item-sets possible where t = no. of unique items Total possible item-sets in this example: 2^6 = 64 Few examples of item-sets Different combinations possible Occurrence Frequency = 3 Accelerate AI >>> AAI
15003 15004 15005 Market basket transactions For illustration purposes only Example of an Association Rule {Diaper} {Beer} {Diaper} {Beer} {Beer} {Diaper} Accelerate AI >>> AAI
{Beer} A B [Support, Confidence] Antecedent Consequent Diaper and Beer are sold together in 60% of the transactions. In 75% cases, when someone purchases a Diaper, a Beer is also purchased. Accelerate AI >>> AAI
many measures of rules – confidence, support, lift, leverage etc. It’s difficult to solve when number of items increase (only 6 unique item-sets can create 2^6 = 64 item-set occurrences) Confidence → can identify trustworthy rules, but it can’t tell you if the rule is coincidental Lift and Leverage helps identify multiple rules and filters the ones which are coincidental So there is a “need” to solve this at a larger scale Accelerate AI >>> AAI
Accelerate AI >>> AAI Apriori Frequent-Pattern Growth Uses breadth-first search Follows divide-and-conquer approach. Uses depth-first search Tree-based Array-based Requires multiple DB scan Requires only two DB scan, consumes more memory Uses depth-first search Array-based Scans the DB once to generate outputs, consumes more memory ECLAT Suitable for large DB and generates frequent item-sets Works on relatively smaller datasets Not appropriate for frequent itemset generation
basket analysis) produce rules on association between items from a database of transactions / events ➢ Key Performance is measured by support, confidence, lift and leverage ➢ Most popular method to enumerate rules is apriori algorithm when we need to handle larger item-sets ➢ To reduce computation, we consider only frequent item sets (= support) ➢ Methods can produce a profusion of rules; review is required to identify useful rules and to reduce redundancy Accelerate AI >>> AAI
Kamal Mishra Data Science & AI Leader 20+ Years of Experience Sachin Kumar ML and Big Data Expert 17+ Years of Experience Accelerate AI >>> Accelerate YOUR career with Data Science Industry experts…. https://www.linkedin.com/company/AccelerateAI [email protected] Subscribe