Data Warehousing and Business Intelligence is one of the hottest skills today, and is the cornerstone for reporting, data science, and analytics. This course teaches the fundamentals with examples plus a project to fully illustrate the concepts.
1. -
1
Intro to Data Warehousing
Data Warehousing vs Data Mining & Data
Preprocessing in Data Mining
Ch Anwar ul Hassan (Lecturer)
Department of Computer Science and Software
Engineering
Capital University of Sciences & Technology, Islamabad
Pakistan
anwarchaudary@gmail.com
2. Slide 2
Apriori Helps in mining/finding the frequent itemset.
• Support
• Confidence
Apriori Algorithm in Data Mining
3. Slide 3
• Apriori Helps in mining/finding the frequent itemset.
Apriori Algorithm in Data Mining
• Step 1: Data in the database
• Step 2: Calculate the support/frequency of all items
• Step 3: Discard the items with minimum support less …
• Step 4: Combine items
• Step 5: Calculate the support/frequency of all items
• Step 6: Discard the items with minimum support less …
• Step 6.5: Combine three items and calculate their
support.
• Step 7: Discard the items with minimum support less
than…..
4. Slide 4
Finding frequent itemset:
Support
Confidence
Minimum Support 50%
Minimum Confidence 50%
No of Items = 4
Support (50/100)*4 = 2
Apriori Algorithm in Data Mining
Transactions Itemsets
I1 A,B,C
I2 A,C
I3 A,D
I4 B,E,F
5. Slide 5
Apriori Algorithm in Data Mining
Transaction Itemsets
I1 A,B,C
I2 A,C
I3 A,D
I4 B,E,F
Items Support
{A} 3
{B} 2
{C} 2
{D} 1
{E} 1
{F} 1
Items Support
{A} 3
{B} 2
{C} 2
Items Support
{A, B} 1
{B, C} 1
{A, C} 2
Items Support
{A, C} 2
6. Slide 6
Apriori Algorithm in Data Mining
Transaction Itemsets
I1 A,B,C
I2 A,C
I3 A,D
I4 B,E,F
Items Support
{A, C} 2
Association
Rule
Support Confidence Percentage
A C 2 2/3 =0.66 66%
C A 2 2/2 = 1 100%
9. Slide 9
Example of Apriori Algorithm
Minimum Support: 2
Step 1: Data in the database
Step 2: Calculate the support/frequency of all items
Step 3: Discard the items with minimum support less than 2
Step 4: Combine two items
Step 5: Calculate the support/frequency of all items
Step 6: Discard the items with minimum support less than 2
Step 6.5: Combine three items and calculate their support.
Step 7: Discard the items with minimum support less than 2
Result:
Only one itemset is frequent (Eggs, Tea, Cold Drink) because this
itemset has minimum support 2
11. Slide 11
Example of Apriori Algorithm
Minimum Support: 2
Step 1: Data in the database
Step 2: Calculate the support/frequency of all items
Step 3: Discard the items with minimum support less than 3
Step 4: Combine two items
Step 5: Calculate the support/frequency of all items
Step 6: Discard the items with minimum support less than 3
Step 6.5: Combine three items and calculate their support.
Step 7: Discard the items with minimum support of less than 3. So all
itemsets are excluded except “Eggs, Cold drink” because this itemset
has the support of 3.
Result:
There is no frequent itemset because all itemsets have minimum
support of less than 3