Association rules by arpit_sharma

ErArpitSharma 46 views 10 slides Apr 10, 2020
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Association Mining Rules and Apriori Algorithm


Slide Content

Arpit Kumar Sharma CSE Department AIETM , Jaipur

Association Rules Mining(ARM) Association rule mining is the data mining process of finding the rules that may govern associations and causal objects between sets of items. ARM is also called Market Basket Analysis(MBA) & affinity analysis. Set of Items in a transaction is called is called Market Basket. Mostly used in RETAIL. If ‘A’ then ‘B’ {A=>B} [Where A is antecedent & B is consequent ]

E x am p le

Two Major terms in ARM Support: (S)- Percentage of Transaction (T) that contains both A and B. {A=>B} = P(Aꓴ B)  it measures frequency of association . Confidence : (C)- In a Transaction Set (T) if C is the % times of times B is in all the transaction Containing A. C=P(B/A)= P(Aꓴ B)/P(A)  Condition Probability

Parameters in ARM Finding all items that appears frequently in transaction.(Minimum Support Count). Finding Strong Associations among frequent items

Association Rules Mining(ARM)

Apriori Algorithm Algo: It is idea to generate Candidate item sets of a given size and then scan dataset to check if their counts are really large. All item sets are candidate in the first pass,any item with less them specified support value is eliminated . We create n number of item sets like one,two –n Generate association rules which have confidence values greater then or equal to specified min confidence.

Apriori Algorithm Question: For the Following transaction given data set ,generates rules using Apriori algorithm .Consider the values as SUPPORT=22% and CONFIDENCE=70% Transaction ID Items Purchased 1 I1,I2,I5 2 I2,I4 3 I2,I3 4 I1,I2,I4 5 I1,I3 6 I2,I3 7 I1,I3 8 I1I2,I3,I5 9 I1,I2,I3 Item Frequency Support I1 6 6/9=66% I2 7 7/9=80% I3 6 6/9=66% I4 2 2/9=22.2% I5 2 2/9=22.2% C1 All item support >=22% Minimum Frequency Support

Apriori Algorithm Now Generate pairs of item sets C3 Item Set Frequency Support I1,I2 4 4/9=44.4% I1,I3 4 4/9=44.4% I1,I4 1 1/9=11.1% I1,I5 2 2/9=22.2% I2,I3 4 4/9=44.4% I2,I4 2 2/9=22.2% I2,I5 2 2/9=22.2% I3,I4 I3,I5 1 1/9=11.1% I4,I5 Item Set Frequency Support I1,I2,I3 2 2/9=22.2% I1,I2,I5 2 2/9=22.2% Item Set Frequency (I1,I2)  I5 2/4=50% (I1,I5)  I2 2/2=100% (I2,I5)  I1 2/2=100% I1  (I2,I5) 2/6=33% I2  (I1,I5) 2/7=29% I5  (I2,I1) 2/2=100% C2

Thank You …