Hi, I am taking a course on Coursera and came into this question. My answer is 1-(4048+3456)/8124=0.076. However, the answer is 0.067. Anybody can help me to solve this? Thank you!!
Asked
Active
Viewed 4.2k times
16
-
What course is this? – Reblochon Masque Jan 24 '18 at 03:14
-
2Coursera applied machine learning in python -- not sure how asking the question here (or taking complete answer) jibes with the honor code – Jeremy Kahan Apr 19 '20 at 19:35
-
1I found this not well explained in one of the UoW courses, so I am glad you posted. – thebluephantom May 03 '20 at 09:44
3 Answers
23
Accuracy: The number of correct predictions made divided by the total number of predictions made.
We're going to predict the majority class associated with a particular node as True. i.e. use the larger value attribute from each node.
So the accuracy for:
- Depth 1: (3796 + 3408) / 8124
- Depth 2: (3760 + 512 + 3408 + 72) / 8124
Depth_2 - Depth_1 = 0.06745

patricio
- 324
- 1
- 4
13
First We will draw confusion metrics for both cases and then find accuracy.
Confusion metrics:
Accuracy= (TP + TN) / (Total number of observation)
Accuracy calculation:
Depth 1: (3796 + 3408) / 8124
Depth 2: (3760 + 512 + 3408 + 72) / 8124
Depth_2 - Depth_1 = 0.06745

Ashish Anand
- 2,575
- 23
- 15
0
Though answer is correct but the confusion matrix looks not correct. This should be the confusion matrix( for depth-2). enter image description here
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 29 '22 at 19:55