Step 1: download weka tool from http://www.windows7download.com/win7-weka/tyjgajwi.html
Step 2: Convert the given table in to data set
No. RID AGE Income Student Credit_rating buys_comp
1 1 youth high no fair no
2 2 youth high no excellent no
3 3 middle_aged high no fair yes
4 4 senior medium no fair yes
5 5 senior low yes fair no
copy following code and save this file with .arff extension studentdet.arff
@relation studentdet
@attribute RID{1,2,3,4,5}
@attributee AGE{youth,middle_aged,senior}
@attribute income{low,high,medium}
@attribute student{yes,no}
@attribute Credit_rating{fair,excellent}
@attribute buys_comp {yes,no}
@data
1,youth,high,no,fair,no
2,youth,high,no,excellent,no
3,middle_aged,high,no,fair,yes
4,senior,medium,no,fair,yes
5,senior,low,yes,excellent,no
Step 3: click weka explore….
Step 4: click “open file” open your student.arff choose tour attribute
Step 5: Weka EXPLORER :CLASSIFIER
Step 6:
ü Choose a cleassifier
ü Under classifier.click choose,the drop-down menu appears
ü Click trees and select JRip –decision tree algorithm
ü From,test option
ü Select Percentage Split (default ratio 66% training and 34% for testing)
ü Click start to train and test the classifier.
Step 7:
ü Right click the result list
ü Choose “virtualise Clessifier error” then a new window will be poped out to display the classifier’s error
ü Correctly predicated case
Step 8: WEKA EXPLORER :CLUSTER
ü Select the cluster tab from the weka explorer window
ü Seleck the k-mean from the “choose” tab
ü Click the “percentage Split” option
ü Click “start button”
ü Right –click the result list for option
ü Select the visualize cluster assignments
The window appears with cluster assignments
step_1.docx |