Sunteți pe pagina 1din 15

2170715 - Data Mining & Business Intelligence

Data Mining & Business Intelligence


Examples
Prof. Naimish R. Vadodariya
naimish.vadodariya@darshan.ac.in
+91-8866215253

Computer
Computer Engineering
Engineering Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Apriori Examples - Try It!
TID Items
1000 A,B,C
2000 A,C
3000 A,D
5000 B,E,F

Itemset Sup
A,C 2

Rule Support Confidence Conf. (%)


AC 2 2/3 = 0.66 66%
CA 2 2/2 = 1 100%

Examples 2 Darshan Institute of Engineering & Technology


Try it!
min-support = 60% and Confidence = 80%
TID Items
100 1,3,4,6
200 2,3,5,7
300 1,2,3,5,8
500 2,5,9,10
600 1,4

Itemset Sup
2,5 3
Rule Support Confidence Conf. (%)
25 3 3/3 = 1 100%
52 3 3/3 = 1 100%

Examples 3 Darshan Institute of Engineering & Technology


Try it!
min-support = 60% and Confidence = 80%
TID Items
T100 K,A,D,B
T200 D,A,C,E,B
T300 C,A,B,E
T400 B,A,D

Itemset Sup
A,B,D 3

Examples 4 Darshan Institute of Engineering & Technology


Cont..
Rule Support Confidence Conf. (%)
A^B D 3 3/4 = 0.75 75%
A^D B 3 3/3 = 1 100%
B^D A 3 3/3 = 1 100%
AB^D 3 3/4 = 0.75 75%
BA^D 3 3/4 = 0.75 75%
DA^B 3 3/3 = 1 100%

Examples 5 Darshan Institute of Engineering & Technology


Try it!
A database has 4 transactions. Let Min_sup = 50% and Min_conf = 75%

TID Items
1000 Cheese, Milk, Cookies
2000 Butter, Milk, Bread
3000 Cheese, Butter, Milk, Bread
4000 Butter, Bread

Itemset Sup
Butter,Milk,Bread 2

Examples 6 Darshan Institute of Engineering & Technology


Cont..
Sr. Rule Support Confidence Conf. (%)
Rule 1 Butter^Milk Bread 2 2/2 = 1 100%
Rule 2 Milk^Bread Butter 2 2/2 = 1 100%
Rule 3 Butter^Bread Milk 2 2/3 = 0.66 66%
Rule 4 ButterMilk^Bread 2 2/3 = 0.66 66%
Rule 5 MilkButter^Bread 2 2/3 = 0.66 66%
Rule 6 BreadButter^Milk 2 2/3 = 0.66 66%

Examples 7 Darshan Institute of Engineering & Technology


Apriori Example
A database has 5 transactions. Let Min_sup = 60% and Min_conf =80%

TID Items Rule Sup Confidence


1000 {M,O,N,K,E,Y} K^OE 3 3/3 = 1 (100%)
2000 {D,O,N,K,E,Y} E^OK 3 3/3 = 1 (100%)
3000 {M,A,K,E}
4000 {M,U,C,K,Y}
5000 {C,O,O,K,I,E}

Itemset Sup
O,K,E 3

Examples 8 Darshan Institute of Engineering & Technology


Apriori & FP-Growth Example
Minimum Support = 2
TID Items
1000 B,E
2000 A,B,C,E
3000 B,C,E
4000 A,C
5000 A

Itemset Sup
B,C,E 2

Examples 9 Darshan Institute of Engineering & Technology


Cont..
Rule Support Confidence Conf. (%)
B^C E 2 2/2 = 1 100%
B^E C 2 2/3 = 0.66 66%
C^E B 2 2/2 = 1 100%
BC^E 2 2/3 = 0.66 66%
CB^E 2 2/3 = 0.66 66%
EB^C 2 2/3 = 0.66 66%

Examples 10 Darshan Institute of Engineering & Technology


FP-Tree Construction (Cont..)
Ordered Itemset
B,E Root

A,B,C,E
B,C,E B:2 A:3
A,C
A E:1 B:1 C:1
C:1

ItemSet E:1 C:1

A:3
B:3 E:1
C:3
E:3

Examples 11 Darshan Institute of Engineering & Technology


Try it!
Find Out Mean, Median, Mode, Range, Standard Deviation & Min
Max Normalization
9, 3, 3, 44, 17, 17, 44, 15, 15, 15, 27, 40, 8
Sorted : 3,3,8,9,15,15,15,17,17,27,40,44,44
Mean = 19.77
Median = 15
Mode = 3,15,17,44 (Multi Model)
Range = 41

Examples 12 Darshan Institute of Engineering & Technology


Cont.. (Standard Deviation)
X X Mean ( X Mean )2
3 -16.77 281.23
3 -16.77 281.23
8 -11.77 138.53
9 -10.77 115.99
15 -4.77 22.75
Sample Variance
15 -4.77 22.75
211.35
15 -4.77 22.75
17 -2.77 7.67
17 -2.77 7.67
27 7.23 52.27 Standard Deviation
40 20.23 409.25 14.53
44 24.23 587.09
44 24.23 587.09
Total 2536.27

Examples 13 Darshan Institute of Engineering & Technology


Min-Max Normalization
Min : Minimum Value = 3
Max : Maximum Value = 44
V = Respective value of attributes. For Example V1= 3, V2=8, V3=9
& So on.
NewMax = 1
NewMin = 0

Formula : V

Examples 14 Darshan Institute of Engineering & Technology


Min-Max Normalization
X Normalized Value
3 0
8 0.12
9 0.14
15 0.29
17 0.34
27 0.58
40 0.90
44 1

Examples 15 Darshan Institute of Engineering & Technology

S-ar putea să vă placă și