Data-Mining-Lab-Manual Final
Data-Mining-Lab-Manual Final
DATA MINING
LAB RECORD
1
lOMoARcPSD|34963378
BONAFIDE CERTIFICATE
NAME :
REGISTER NUMBER :
CLASS : I I I BCA SEMESTER: V
SUBJECT WITH CODE : DATA MINING LAB
2
lOMoARcPSD|34963378
INDEX
1
Create an Employee Table
Create a Weather
2
Table
Pre-Processing techniques to the
3
training data set of Weather Table
Pre-Processing techniques
4 to the training data set of
Employee Table
Association Rules for
5
Buying data.
3
lOMoARcPSD|34963378
EXPERIMENT NO: 1
Aim:
Create an Employee Table with the help of Data Mining Tool WEKA.
Procedure:
Steps:
@relation employee
4
lOMoARcPSD|34963378
@data
x,101,low,2,male,250311
y,102,high,3,female,251665
z,103,medium,1,male,240238
a,104,low,5,female,200200
b,105,high,2,male,240240
5
lOMoARcPSD|34963378
Result:
6
lOMoARcPSD|34963378
EXPERIMENT NO:2
Aim:
Create a Weather Table with the help of Data Mining Tool WEKA.
Procedure:
Steps:
@relation weather
@attribute outlook
{sunny,rainy,overcast} @attribute
temparature numeric @attribute humidity
numeric
@attribute windy {true,false}
@attribute play {yes,no}
@data
sunny,85.0,85.0,false,no
overcast,80.0,90.0,true,no
sunny,83.0,86.0,false,yes
rainy,70.0,86.0,false,yes
rainy,68.0,80.0,false,yes
rainy,65.0,70.0,true,no
overcast,64.0,65.0,false,yes
sunny,72.0,95.0,true,no
sunny,69.0,70.0,false,yes
rainy,75.0,80.0,false,yes
1) Minimize the arff file and then open Start Programs weka-3-4.
2) Click on weka-3-4, then Weka dialog box is displayed on the screen.
3) In that dialog box there are four modes, click on explorer.
4) Explorer shows many options. In that click on ‘open file’ and select the arff file
5) Click on edit button which shows weather table on weka.
7
lOMoARcPSD|34963378
Result:
8
lOMoARcPSD|34963378
EXPERIMENT NO:3
Aim:
Procedure:
@relation weather
@attribute outlook
{sunny,rainy,overcast} @attribute
temparature numeric @attribute humidity
numeric
@attribute windy {true,false}
@attribute play {yes,no}
@data
sunny,85.0,85.0,false,no
overcast,80.0,90.0,true,no
sunny,83.0,86.0,false,yes
rainy,70.0,86.0,false,yes
rainy,68.0,80.0,false,yes
rainy,65.0,70.0,true,no
overcast,64.0,65.0,false,yes
sunny,72.0,95.0,true,no
sunny,69.0,70.0,false,yes
rainy,75.0,80.0,false,yes
1) Minimize the arff file and then open Start Programs weka-3-4.
2) Click on weka-3-4, then Weka dialog box is displayed on the screen.
3) In that dialog box there are four modes, click on explorer.
4) Explorer shows many options. In that click on ‘open file’ and select the arff file
5) Click on edit button which shows weather table on weka.
9
lOMoARcPSD|34963378
10
Procedure:
10
lOMoARcPSD|34963378
11
Procedure:
11
lOMoARcPSD|34963378
12
Result:
12
lOMoARcPSD|34963378
13
EXPERIMENT NO:4
Aim:
Procedure:
@relation employee
@attribute name {x,y,z,a,b}
@attribute id numeric
@attribute salary {low,medium,high}
@attribute exp numeric
@attribute gender {male,female}
@attribute phone numeric
@data
x,101,low,2,male,250311
y,102,high,3,female,251665
z,103,medium,1,male,240238
a,104,low,5,female,200200
b,105,high,2,male,240240
13
lOMoARcPSD|34963378
14
Procedure:
14
lOMoARcPSD|34963378
15
Procedure:
15
lOMoARcPSD|34963378
16
Result:
16
lOMoARcPSD|34963378
17
EXPERIMENT NO:5
Procedure:
Output:
17
lOMoARcPSD|34963378
18
18
lOMoARcPSD|34963378
19
Result:
19
lOMoARcPSD|34963378
20
EXPERIMENT NO:6
Procedure:
20
lOMoARcPSD|34963378
21
21
lOMoARcPSD|34963378
22
Output:
Result:
22
lOMoARcPSD|34963378
23
EXPERIMENT NO:7
Procedure:
@data
youth, high, A
youth,medium,B
youth, low, C
middle, low, C
middle, medium, C
middle, high, A
senior, low, C
senior, medium, B
senior, high, B
middle, high, B
23
lOMoARcPSD|34963378
24
24
lOMoARcPSD|34963378
25
Output:
Result:
25
lOMoARcPSD|34963378
26
EXPERIMENT NO:8
Aim:
Procedure:
@data
sunny,85,85,FALSE,no
sunny,80,90,TRUE,no
overcast,83,86,FALSE,yes
rainy,70,96,FALSE,yes
rainy,68,80,FALSE,yes
rainy,65,70,TRUE,no
overcast,64,65,TRUE,yes
sunny,72,95,FALSE,no
sunny,69,70,FALSE,yes
rainy,75,80,FALSE,yes
sunny,75,70,TRUE,yes
overcast,72,90,TRUE,yes
overcast,81,75,FALSE,yes
rainy,71,91,TRUE,no
26
lOMoARcPSD|34963378
27
27
lOMoARcPSD|34963378
28
Output:
Decision Tree:
28
lOMoARcPSD|34963378
29
EXPERIMENT NO:9
Aim:
Procedure:
@data
x,youth,high,A
y,youth,low,B
z,middle,high,A
u,middle,low,B
v,senior,high,A
l,senior,low,B
w,youth,high,A
q,youth,low,B
r,middle,high,A
n,senior,high,A
29
lOMoARcPSD|34963378
30
Output:
30
lOMoARcPSD|34963378
31
Decision Tree:
31
lOMoARcPSD|34963378
32
EXPERIMENT NO:10
Aim:
Procedure:
@data
21,hyd
21,hyd
24,blr
24,blr
24,blr
24,blr
21,hyd
25,kdp
25,kdp
25,kdp
3) After that the file is saved with .arff file format.
4) Minimize the arff file and then open Start Programs weka-3-4.
5) Click on weka-3-4, then Weka dialog box is displayed on the screen.
6) In that dialog box there are four modes, click on explorer.
7) Explorer shows many options. In that click on ‘open file’ and select the arff file
8) Click on edit button which shows location table on weka.
32
lOMoARcPSD|34963378
33
33
lOMoARcPSD|34963378
34
Output:
Decision Tree:
Result:
34
lOMoARcPSD|34963378
35
EXPERIMENT NO:11
Aim: Write a procedure for Employee data using Make Density Based Cluster Algorithm.
Procedure:
@data
101,raj,10000,4,pdtr
102,ramu,15000,5,pdtr
103,anil,12000,3,kdp
104,sunil,13000,3,kdp
105,rajiv,16000,6,kdp
106,sunitha,15000,5,nlr
107,kavitha,12000,3,nlr
108,suresh,11000,5,gtr
109,ravi,12000,3,gtr
110,ramana,11000,5,gtr
111,ram,12000,3,kdp
112,kavya,13000,4,kdp
113,navya,14000,5,kdp
3) After that the file is saved with .arff file format.
4) Minimize the arff file and then open Start Programs weka-3-4.
5) Click on weka-3-4, then Weka dialog box is displayed on the screen.
6) In that dialog box there are four modes, click on explorer.
7) Explorer shows many options. In that click on ‘open file’ and select the arff file
8) Click on edit button which shows employee table on weka.
35
lOMoARcPSD|34963378
36
Procedure
:
1) Click on Cluster menu. In this there are different algorithms are there.
2) Click on Choose button and then select MakeDensityBasedClusterer algorithm.
3) Click on Start button and then output will be displayed on the screen.
36
lOMoARcPSD|34963378
37
Output:
Result:
The program has been successfully executed.
37
lOMoARcPSD|34963378
38
EXPERIMENT NO:12
Aim: Write a procedure for Clustering Customer data using Simple KMeans Algorithm.
Procedure:
@data
x,youth,high,A
y,youth,low,B
z,middle,high,A
u,middle,low,B
v,senior,high,A
l,senior,low,B
w,youth,high,A
q,youth,low,B
r,middle,high,A
n,senior,high,A
38
lOMoARcPSD|34963378
39
Procedure:
1) Click on Cluster menu. In this there are different algorithms are there.
2) Click on Choose button and then select SimpleKMeans algorithm.
3) Click on Start button and then output will be displayed on the screen.
39
lOMoARcPSD|34963378
40
Output:
Result:
The program has been successfully executed.
40