Professional Documents
Culture Documents
Lecture 17
Association Rule
Association rule learning
◦ It is an association algorithm.
◦ Association rule learning is a rule-based machine learning method for discovering
interesting relations between variables in large databases. ... It identifies frequent if-then
associations called association rules which consists of an antecedent (if) and a consequent
(then).
◦ (antecedent) A B (consequent)
◦ Relationship between items A and B is known as single cardinality.
◦ If a costumer buy A,B and C then cardinality usually increases accordingly.
Apriori algorithm
◦ Apriori algorithm refers to the algorithm which is used to calculate the association rules
between objects. It means how two or more objects are related to one another.
◦ Apriori algorithm is also called frequent pattern mining.
Support =
Confidence =
Lift =
Example
◦ For the following given transaction Dataset, Generate rules using Apriori Algorithm. Consider the values
as SUPPORT = 50% and CONFIDENCE = 75%
We have to consider only support greater then 50%, So Egg and Yogurt will be
discarded.
Cont..
2-Items candidate set and write their frequency
1. Confidence = = × = = 75%
2. Confidence = = × = = 75%
Cont..
(Cheese, Juice) 3 3/5 = 60%
1. Confidence = = × = 100%
2. Confidence = = × = 75%
Rule 1: Bread, Juice = 75%
Rule 2: Juice, Bread = 75%
Rule 3: Cheese, Juice = 100%
Rule 4: Juice, Cheese = 75%