Assignment
1. Create a Weather Table with the help of Data Mining Tool WEKA
Description:
We need to create a Weather table with training data set which includes attributes
like outlook, temperature, humidity, windy, play.
Procedure:
Steps:
1)Open Start Programs Accessories Notepad
2) Type the following training data set with the help of Notepad for Weather
Table.
Code:
@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
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,y
essunny,72.0,95.0,true,no
sunny,69.0,70.0,false,yes
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 onweka-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 weather table on weka.
Result:
This program has been successfully executed.
2. Apply Pre-Processing techniques to the training data set of Weather
Table
Description:
Real world databases are highly influenced to noise, missing and inconsistency
due to their queue size so the data can be pre-processed to improve the quality
of data and missing results and it also improves the efficiency.
There are 3 pre-processing techniques they are:
1)Add
2)Rmove
3)Normalization
Creation of Weather Table:
Procedure:
1) Open Start Programs Accessories Notepad
2) Type the following training data set with the help of Notepad for Weather
Table.
Code:
@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
overcast,80.0,90.0,
sunny,83.0,86.0,false
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
Pre-processing:
Result:
This program has been successfully executed.
3 . Write a program to demonstrate Visualization for Weather . arff.
Description:
Real world databases are highly influenced to noise, missing and inconsistency
due to their queue size so the data can be pre-processed to improve the quality
of data and missing results and it also improves the efficiency.
There are 3 pre-processing techniques they are:
1)Add
2)Remov
e
3)Normalization
Creation of Weather Table:
Procedure:
1) Open Start Programs Accessories Notepad
2) Type the following training data set with the help of Notepad for Weather Table.
Code:
@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,n
o
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,y
essunny,72.0,95.0,true,no
sunny,69.0,70.0,false,yes
rainy,75.0,80.0,false,yes
Pre-processing:
Visualization of all Weather:
Result:
This program has been successfully executed and Visualized all the weathers.
4. Write a program to demonstrate Visualization for Weather . arff.
Description:
We need to create a Weather table with training data set which includes attributes
like outlook, temperature, humidity, windy, play.
Procedure:
Steps:
1)Open Start Programs Accessories Notepad
2)Type the following training data set with the help of Notepad for Weather
Table.
Code:
@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
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 onweka-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 weather table on weka.
Input Data:
1. Code Execution:
2. Click on Classify Button:
3. Select Bayes then choose NaiveBayes.
4. After that choose the Percentage split in Test options make it 66% or
70% thenclick the START option.
5. After that got the Classifier Output:
Results/
Output:
=== Summary ===
Correctly Classified Instances 3 60 %
Incorrectly Classified 2 40 %
Instances
Kappa statistic 0
Mean absolute error 0.5129
Root mean squared error 0.5706
Relative absolute error 108.5002 %
Root relative squared error 116.1441
%
Total Number of Instances 5
=== Confusion Matrix ===
a b <-- classified as
3 0 | a = yes
2 0 | b = no