You are on page 1of 34

EXP NO: DATE:

CREATE STUDENT RELATION EXPLORE

AIM: To create student arff file explore in explorer application by using data mining
functionalities preprocessing and classification of the data

Procedure:
1. Start-> program-> weka 3.5.6-> weka3.5 open one window. Select explorer in
application tab
2. Click on preprocess button
Open file->data->select student.arff
3. Student file explore in explore window
choose ->fitters
4. Next click classify button, and select the classifiers
Choose->rules-> zeroR
5. Next check on use training set in test options
6. Next click on start the button the classifier output will be displayed in right side
window.
7. Result list in program right click to select visualization classify error. The output will
be displayed next window.

ASCET
EXP NO: DATE:

Program:

@relation student
@attribute so numeric
@attribute sname{suma,uma,rani,sony}
@attribute scourser{mca,mba,btech}
@attribute marks1 numeric
@attribute marks2 numeric
@attribute marks3 numeric
@attribute class{first-class,second-class,fail}
@data
11,suma,mca,70,80,90,first-class
12,uma,mba,56,67,76,second-class
13,rani,btech,34,23,32,fail
21,sony,mca,78,99,86,first-class
22,suma,mba,35,46,75,second-class
23,rani,btech,13,21,31,fail

ASCET
EXP NO: DATE:

OUTPUT :

Preprocess:

Viewer:

ASCET
EXP NO: DATE:

Classify:

Visualize:

Result:

ASCET
EXP NO: DATE:

CONSTRUCTION OF DECISION TREE FOR COLLEGE DATA

AIM: To generate a decision tree construction for college data

Procedure:

1. Start->program->weka 3.5.6->weka3.5
2. Click down is open and select explorer in application tab and select
Open file->data->choose college dataset
It will loaded into weka in explorer.
3. Next click on classified tab and choose classify in trees->J48 algorithm
4. And select cross validation tab and choose classify in test options
5. Next click on start button then program can be generated in right side of the window,
at left side of window results can be generated

Program:

@relation college
@attribute collegecode {f1,f2}
@attribute name {narayana,audisankara}
@attribute staffid numeric
@attribute sname {ram,ravi,kala,gita}
@attribute dept {mca,mba}
@attribute sal numeric
@attribute explain {good,avg,poor,excellent}
@data
f1,narayana,101,ram,mca,10000,good
f2,audisankara,102,ravi,mca,20000,excellent
f1,narayana,103,gita,mba,8000,avg
f2,audisankara,104,kala,mba,5000,poor
f1,narayana,105,ram,mca,30000,excellent

ASCET
EXP NO: DATE:

OUTPUT:

Preprocess:

Viewer:

ASCET
EXP NO: DATE:

Classify:

Tree Visualizer:

Result:

ASCET
EXP NO: DATE:

FIND DECISION TREE USING CROSS -VALIDATION

AIM:
To explain about cross-validation list our. Find out decision tree (J48) using
crossvalidation and then apply classification in linear regression function performing on the
weather data set

Procedure:

1. Start->program->weka 3.5.6->weka3.5
Click down is open and select explorer in application tab
2. Next click on the preprocessor tab and select open file->data->choose weather
data set, it will loaded in weka.
3. Next click on classify tab and choose classify in trees
4. Next click on start button then program can be generated in the right of the
window, at left side of window, result can be generated.
5. Select another input operation. It preprocessor tab
Open file->data-> weather data
6. Next click on classify tab and choose classifier window arrow function.
7. Next click start button the program is generated the result can be displayed in left
side window.

ASCET
EXP NO: DATE:

Program:

@relation weather
@attribute outlook {sunny, overcast, rainy}
@attribute temperature real
@attribute humidity real
@attribute windy {TRUE, FALSE}
@attribute play {yes, no}

@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

ASCET
EXP NO: DATE:

OUTPUT:

Preprocess:

Classify:

ASCET
EXP NO: DATE:

Tree visualizer:

Result:

ASCET
EXP NO: DATE:

CREATE AN EMPLOYEE RELATION EXPLORE

AIM: To create an employee relation explores it in explore application that can be perform

Procedure:

1. Start->program->weka3.5.6->weka3.5
2. Click window is open and select explorer in application tab
3. Next click on preprocessor tab and
4. Select open file->data
5. Choose the employee data, it will loaded in weka in explorer
6. Next click the start button then programs can be generated
7. Select another input operation it preprocessor tab
8. Select the associate option in explorer
9. Finally click on visualize tab

PROGRAM
@relation emp
@attribute empno{101,102,103,104,105,106,107,108,109,110}
@attribute name{ram,ravi,kala,gita,latha}
@attribute sal{50000,10000,90000}
@attribute job{manager,cleark,salesman,principal,viceprincipal}
@data
101,ram,50000,manager
102,ravi,10000,salesman
103,kala,50000,cleark
104,gita,10000,viceprincipal
105,gita,10000,salesman
106,kala,90000,principal
107,latha,50000,cleark
108,kala,90000,manager
109,ravi,10000,viceprincipal
110,ravi,50000,manager

ASCET
EXP NO: DATE:

OUTPUT:

Preprocess:

Classify:

ASCET
EXP NO: DATE:

Tree Visualizer:

Associate:

ASCET
EXP NO: DATE:

Select attributes:

Visualizing:

Result:

ASCET
EXP NO: DATE:

BUILD A DECISION TREE FOR EMPLOYEE DATA

AIM: To building a decision tree as complete data for finding data for generating a model. The
dataset is validating the modern curve accuracy.

Procedure:

1. Start->program->weka3.5
2. Click on preprocess button
Open file->data->select e.g: arff
3. Student file explore in explore window
Choose->filters
4. Next click classify button and select the classifiers
Choose->rules->ZeroR
5. Next click on start the button the classifiers. Output will be displayed in right side
window.
6. Result list in program right click to select visualization classify error. The output
will be displayed in next window.

ASCET
EXP NO: DATE:

Program:

@relation data
@attribute sepallength numeric
@attribute sepalwidth numeric
@attribute petallength numeric
@attribute petalwidth numeric
@attribute class{Iris_setosa,Iris_verginica,Iris_versicol}
@data
4.4, 3.2, 1.3, 0.2, Iris_setosa
1.7, 2.5, 3.8, 1.8, Iris_verginica
1.3, 3.9, 1.7, 0.4, Iris_setosa
4.6, 3.4, 1.4, 0.3, Iris_setosa
5.8, 2.7, 5.1, 1.9, Iris_verginica
6.6, 3.0, 4.4, 1.4, Iris_versicol
4.6, 3.4, 1.4, 0.3, Iris_setosa
5.8, 2.7, 5.1, 1.9, Iris_verginica
4.1, 3.2, 1.3, 0.2, Iris_setosa
6.8, 2.8, 4.8, 1.4, Iris_versicol

ASCET
EXP NO: DATE:

OUTPUT:

Preprocess:

Viewer:

ASCET
EXP NO: DATE:

Tree Visualizer:

Result:

ASCET
EXP NO: DATE:

CONSTRUCT CROSS-VALIDATION J-48 ALGORITHM

AIM: To construct a cross validation J-48 algorithm step a flow to load an arff file emp and
validation using J-48 algorithm.

Procedure:

1. Click on data source button arff loader click on drag the layout
2. Right click on arff loader
3. Click on the classifier and show the number of icons. The cross validation flow makes
and click validation
4. Right click on class assigner, select data set
5. Again click on classifier tab, select J-48 tree, click on the layout
6. Right click cross-validation tab, select test
7. Click on the evaluation tab, first select the classifier drop and drag the layout
8. After finishing layout, right click on arff loader.

Program:

@relation emp
@attribute empno{101,102,103,104,105,106,107,108,109,110}
@attribute name{ram,ravi,kala,gita,latha}
@attribute sal{50000,10000,90000}
@attribute job{manager,cleark,salesman,principal,viceprincipal}
@data
101,ram,50000,manager
102,ravi,10000,salesman
103,kala,50000,cleark
104,gita,10000,viceprincipal
105,gita,10000,salesman
106,kala,90000,principal
107,latha,50000,cleark
108,kala,90000,manager
109,ravi,10000,viceprincipal
110,ravi,50000,manager

ASCET
EXP NO: DATE:

OUTPUT:

Knowledge Flow:

Text Viewer:

Result:

ASCET
EXP NO: DATE:

MULTIPLE ROC CURVES

AIM: To create a bank arff relation and applying multiple ROC curves using weka in
knowledge flow applications.

Procedure:

1. Right click on arff loader.


2. After that click on class assigner in the evoluation tab.
3. Set the data set by right click on arff loader.
4. Click on the cross validation fold maker in evoluation tab, and also set the data set
between class asigner and cross validation fold maker
5. Select J48 and Random forest algorithm separately in the layout .using the training set
& test set in evaluation tab making the relation between cross validation fold maker
and algorithms
6. Click on classifier performance evaluation and make relation with batch classifier by
clicking on J48 & Random forest algorithms.
7. Place the text viewer and graph viewer for getting the output.

ASCET
EXP NO: DATE:

Program:

@relation bank
@attribute eno{1000,1001,1002,1003,1004,1005,1006,1007,
1008,1009,1010,1011,1012,1013,1014}
@attribute name{ram,ravi,latha,purna,kala,raj}
@attribute address{gudur,hyd,nellore}
@attribute loantype{educational,agriculture,house}
@attribute loanamt{10000,20000,30000,40000,50000}
@attribute paidamt{9000,7000,10000,5000}
@attribute branch{gudur,nellore,chennai}
@data
1000,kala,gudur,educational,10000,7000,nellore
1001,ravi,nellore,house,30000,5000,chennai
1002,latha,gudur,agriculture,40000,9000,nellore
1003,ram,nellore,educational,50000,7000,nellore
1004,purna,hyd,house,30000,7000,nellore
1005,ram,gudur,educational,10000,9000,chennai
1006,latha,hyd,agriculture,10000,7000,gudur
1007,kala,gudur,educational,50000,10000,nellore
1008,purna,gudur,educational,10000,5000,gudur
1009,ram,gudur,agriculture,10000,9000,chennai
1010,raj,nellore,house,30000,7000,nellore
1011,kala,nellore,educational,20000,7000,chennai
1012,ram,hyd,house,40000,7000,nellore
1013,latha,hyd,house,20000,5000,gudur
1014,ravi,gudur,educational,10000,7000,gudur

ASCET
EXP NO: DATE:

OUTPUT:

Knowledge Flow:

Text viewer: (j48)

ASCET
EXP NO: DATE:

Text viewer: (Random Forest)

Graph Viewer:

Result:

ASCET
EXP NO: DATE:

EMPLOYEE RELATION IN KNOWLEDGE APPLICATION

AIM: To create employee relation explore in knowledge flow application using clusters such as
M5P and REP tree algorithm.

Procedure:

1. Right click on the Arff loader.


2. After that right click on the class assigner in evaluation tab.
3. Set the dataset by right click on the Arff loader.
4. Click on the cross validation fold maker in evaluation tab and also set the dataset
between class assigner and cross validation fold maker.
5. Select M5P and REP tree set in the layout using training set and test set in evaluation
tab making the relation between cross validation fold maker and algorithm.
6. Click on the classifier performance evaluator and make relation with batch classifier
by clicking on J48 and REP tree algorithms.
7. Add place the text viewer and graph viewer for getting the outputs.

ASCET
EXP NO: DATE:

Program:

@relation emp
@attribute eno numeric
@attribute ename {ram, ravi, rani, kala}
@attribute dept {mca, mba}
@attribute sal numeric
@data
1, ram, mca, 10000
2, ravi, mba, 20000
3, rani, mca, 30000
4, kala, mba, 40000
5, ram, mca, 50000
6, ravi, mba, 10000
7, rani, mca, 50000
8, kala, mba, 20000
9, ram, mca, 10000
10, ravi, mca, 10000
11, ram, mba, 20000
12, kala, mca, 30000

ASCET
EXP NO: DATE:

OUTPUT:

Knowledge Flow:

Text Viewer: (M5P)

ASCET
EXP NO: DATE:

Text viewer: ( REP Tree)

Graph Viewer:

ASCET
EXP NO: DATE:

Tree visualizer: (M5P)

Tree Visualizer: (REP Tree)

Result:

ASCET
EXP NO: DATE:

CREATE PROJECT IRIS RELATION IN EXPLORE APPLICATION

AIM: To create a project program and apply experimenter method.

Procedure:

1. Click on the experimenter tab in Weka GUI chooser.


2. Select setup option and click on new button and select the file name.
3. Add data sets and algorithms by using the files to the tab.
4. After run the tab , click on the run option.
5. In the run tab, click on the start button.
6. We can analyze the data by using analyze option.

Program:

@relation project
@attribute projectnumber{10,11,12,13,14,15}
@attribute projectname{supermarket,mobile,green}
@attribute Companyname{wipro,infosis,hcl}
@attribute empno{1,2,3,4,5,6}
@attribute empname{ram,ravi,mani,gita,purna,kala}
@data
10,supermarket,wipro1,ram
11,mobile,infosis,2,ravi
12,green,hcl,3,mani
13,supermarket,wipro4,purna
14,mobile,infosis,5,purna
15,green,hcl,6,kala

ASCET
EXP NO: DATE:

OUTPUT:

Set up:

Run:

ASCET
EXP NO: DATE:

Analyse:

ASCET
EXP NO: DATE:

Result:

ASCET

You might also like