Question: Coding help!! We are using Weka Tool. Creating J48 Design Tree Classifier Dataset is below is an ARFF File @relation weather.symbolic @attribute outlook {sunny, overcast,

Coding help!! We are using Weka Tool.

Creating J48 Design Tree Classifier

Dataset is below is an ARFF File

@relation weather.symbolic

@attribute outlook {sunny, overcast, rainy} @attribute temperature {hot, mild, cool} @attribute humidity {high, normal} @attribute windy {TRUE, FALSE} @attribute play {yes, no}

@data sunny,hot,high,FALSE,no sunny,hot,high,TRUE,no overcast,hot,high,FALSE,yes rainy,mild,high,FALSE,yes rainy,cool,normal,FALSE,yes rainy,cool,normal,TRUE,no overcast,cool,normal,TRUE,yes sunny,mild,high,FALSE,no sunny,cool,normal,FALSE,yes rainy,mild,normal,FALSE,yes sunny,mild,normal,TRUE,yes overcast,mild,high,TRUE,yes overcast,hot,normal,FALSE,yes rainy,mild,high,TRUE,no

Coding help!! We are using Weka Tool. Creating J48 Design Tree Classifier

In this assignment, you will be creating a J48 Decision Tree in Java using weather.nominal.arff as the training data set (located in Weka's data folder) The J48 classifier uses entropy when determining best splits. Your job will be to figure out how to load in an ARFF file (HINT: You will need to load it into an Instances object) and then use it to build a J48 classifier. Once you have done this, you will need to produce the output as shown below in Figure 1 (HINT: look at the Evaluation object, particularly at the crossValidateModel method 48 pruned tree outlook = sunny humidity = high : no (3.0) humidity = normal: yes (2.0) outlook overcast : yes (4.0) outlook = rainy windy= TRUE : no (2.0) windy FALSE: yes (3.0) Number of Leaves Size of the tree 8 Correctly Classified Instances Incorrectly Classified Instances Kappa statistic Mean absolute error Root mean squared error Relative absolute error Root relative squared error Total Number of Instances 50 50 -0.0426 0.4167 0.5984 87.5 % 121.2987 % 14 = Detailed Accuracy By Class === TP Rate FP Rate Precision Recall F-Measure MCC 0.556 0.600 0.625 0.400 0.444 0.333 0.500 .544 0.521 ROC Area PRC Area Class 0.043 0.633 0.556 0.588 0.400 0.364 0.500 0.508 0.758 0.457 0.650 yes 0.043 0.633 no eighted Avg 0.043 0.633 === Confusion Matrix === a b -classified as 5 4 a yes 321b=no Figure 1 In this assignment, you will be creating a J48 Decision Tree in Java using weather.nominal.arff as the training data set (located in Weka's data folder) The J48 classifier uses entropy when determining best splits. Your job will be to figure out how to load in an ARFF file (HINT: You will need to load it into an Instances object) and then use it to build a J48 classifier. Once you have done this, you will need to produce the output as shown below in Figure 1 (HINT: look at the Evaluation object, particularly at the crossValidateModel method 48 pruned tree outlook = sunny humidity = high : no (3.0) humidity = normal: yes (2.0) outlook overcast : yes (4.0) outlook = rainy windy= TRUE : no (2.0) windy FALSE: yes (3.0) Number of Leaves Size of the tree 8 Correctly Classified Instances Incorrectly Classified Instances Kappa statistic Mean absolute error Root mean squared error Relative absolute error Root relative squared error Total Number of Instances 50 50 -0.0426 0.4167 0.5984 87.5 % 121.2987 % 14 = Detailed Accuracy By Class === TP Rate FP Rate Precision Recall F-Measure MCC 0.556 0.600 0.625 0.400 0.444 0.333 0.500 .544 0.521 ROC Area PRC Area Class 0.043 0.633 0.556 0.588 0.400 0.364 0.500 0.508 0.758 0.457 0.650 yes 0.043 0.633 no eighted Avg 0.043 0.633 === Confusion Matrix === a b -classified as 5 4 a yes 321b=no Figure 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!