Professional Documents
Culture Documents
Assignment – 2: -
Description
In this report, I have experimented classification techniques on two Datasets: Weather and Iris.
The weather dataset is used to build a classification model on whether to play or not based on a
given instance. The weather data set has 4 nominal attributes: outlook (sunny, overcast, rainy),
temperature (hot, mild, cold), humidity (high, normal) and windy (TRUE, FALSE). The class label
for the weather dataset is play (YES, NO). On the other hand, the iris data set is used to predict
whether an instance belong to Iris-setosa, Iris-versicolor and Iris-virginca iris subspecies. The iris
data set has 4 numeric attributes: sepallength, sepalwidth, petallength, petalwidth. The
weather dataset had 14 instances which is very little to be used for accurate knowledge
extraction. The dataset of weather and iris is complete since there was no missing data in the
attribute.
Results
I have used algorithims: RandomTree, J48 decision tree, and REPTree. In this section, I am going
to present the results of the three algorithms of the two datasets.
Weather
A,Randomtree algorithm
1
Correctly Classified Instances 8 57.1429 %
a b <-- classified as
6 3 | a = yes
3 2 | b = no
2
Correctly Classified Instances 7 50 %
a b <-- classified as
5 4 | a = yes
3
3 2 | b = no
c. REPTree
a b <-- classified as
8 1 | a = yes
5 0 | b = no
Iris
a. RandomTree
4
Correctly Classified Instances 138 92 %
Incorrectly Classified Instances 12 8%
Precision Recall F-Measure Class
a b c <-- classified as
50 0 0 | a = Iris-setosa
0 43 7 | b = Iris-versicolor
5
1 5 45 | c = Iris-virginica
B, J48 decision tree
a b c <-- classified as
49 1 0 | a = Iris-setosa
0 47 3 | b = Iris-versicolor
6
0 2 48 | c = Iris-virginica
C, REPTree.
a b c <-- classified as
50 0 0 | a = Iris-setosa
0 46 4 | b = Iris-versicolor
7
1 5 45 | c = Iris-virginica
Conclusion
The accuracy of the weather dataset when using RandomTree, J48 & REPTree are 57.14%, 50% &
57%. The accuracy of the Iris dataset when using RandomTree, J48 & REPTree are 92%, 96% & 94%.