PROGRAM NO-1
OBJECTIVE: To create data-set in .arff file format. Demonstration of
preprocessing on WEKA data-set.
Creating the Data-set in .arff file format for Student Record.
Wite the below code in notepad or any other editor.
@relation studentrecord
@attribute [Link]. numeric
@attribute Name{Ram,Shyam,Arjun,Kiran,Sama,Rama,Gaama,Beta,Alpha,Theeta}
@attribute RollNo. numeric
@attribute Physics numeric
@attribute Maths numeric
@attribute Chemistry numeric
@data
1,Ram,8,100,100,100
2,Shyam,7,98,99,96
3,Arjun,3,99,98,98
4,Kiran,4,96,97,99
5,Sama,5,95,96,100
6,Rama,6,94,96,95
7,Gaama,9,93,97,97
8,Beta,2,92,99,96
9,Alpha,1,91,94,98
10,Theeta,10,90,95,100
11,Rama,11,100,100,99
Save it in .arff format.
To Preprocess:
1-Open WEKA tool go to the Preprocess option on the top left corner.
2-Click on the Open file….
Choose the file that has been save at any location in your PC.
3-After opening it gives the overall data about the data that has been saved and
its various aspect as shown below.
4-Now filter can be applied to display out the value of required fields.
5-Choose the filter
i)Attribute Selection
ii)Normalise
Go to the filter as shown above and click to choose
weka>filter>unsupervised>Normalise.(Here one attribute is removed that is of
subject).
And in the attribute field choose rollno.
Result obtained is:
iii)Discretize
Go to the filter as shown above and click to choose
weka>filter>unsupervised>Discretize.(Here three field from subject is taken-
physics,maths,chemistry).
Result Obtained:
iv)Randomize
Go to the filter as shown above and click to choose
weka>filter>unsupervised>Randomize.(Here two field from subject is taken-
maths,chemistry).