Answered step by step
Verified Expert Solution
Question
1 Approved Answer
13 14 15 Question 5. [7 marks] Consider the following dataset related to approving loans to customers: Training Dataset ID Class Has Job Has House
13 14 15 Question 5. [7 marks] Consider the following dataset related to approving loans to customers: Training Dataset ID Class Has Job Has House Credit History No No Fair No Yes Good Yes No Good Yes Yes Good No Yes Excellent No Yes Excellent No Yes Excellent No Yes Good Yes No Good No Fair No Fair No Fair No Excellent 1 2 3 4 5 6 7 8 9 Test Dataset 10 11 12 Age Yong Yong Yong Middle Middle Middle Old Old Old Yong Yong Middle Old No No No No No Yes No Yes No No Yes Yes Yes No Yes No Yes a) Using the entire training dataset, build the decision tree based on ID3 algorithm (4 marks). Hint: Entropy Tables P N P N E[P, N] P E[P, N] N E[P, N] 3 1 1 1 2 1 2 0.918296 3 0.970951 4 0.985228 3 0.811278 4 0.918296 5 0.954434 4 0.721928 5 0.863121 6 0.918296 5 0.650022 2 6 0.811278 6 0.591673 2 7 0.764205 E[P, N] 1 1 7 0.543564 4 E[P, 0]=0 E[N,P] = E[P.N] 1 8 0.503258 4 5 0.991076 b) Using the test dataset (10-13), calculate the accuracy of the produced decision tree (2 marks). c) Fill in the missing dataset (14-15) so the accuracy increases to over 80% (1 mark). Answers: 1 1 1 1 1 1 2 2 2 2 P 3 3 3 3 4 N 13 14 15 Question 5. [7 marks] Consider the following dataset related to approving loans to customers: Training Dataset ID Class Has Job Has House Credit History No No Fair No Yes Good Yes No Good Yes Yes Good No Yes Excellent No Yes Excellent No Yes Excellent No Yes Good Yes No Good No Fair No Fair No Fair No Excellent 1 2 3 4 5 6 7 8 9 Test Dataset 10 11 12 Age Yong Yong Yong Middle Middle Middle Old Old Old Yong Yong Middle Old No No No No No Yes No Yes No No Yes Yes Yes No Yes No Yes a) Using the entire training dataset, build the decision tree based on ID3 algorithm (4 marks). Hint: Entropy Tables P N P N E[P, N] P E[P, N] N E[P, N] 3 1 1 1 2 1 2 0.918296 3 0.970951 4 0.985228 3 0.811278 4 0.918296 5 0.954434 4 0.721928 5 0.863121 6 0.918296 5 0.650022 2 6 0.811278 6 0.591673 2 7 0.764205 E[P, N] 1 1 7 0.543564 4 E[P, 0]=0 E[N,P] = E[P.N] 1 8 0.503258 4 5 0.991076 b) Using the test dataset (10-13), calculate the accuracy of the produced decision tree (2 marks). c) Fill in the missing dataset (14-15) so the accuracy increases to over 80% (1 mark). Answers: 1 1 1 1 1 1 2 2 2 2 P 3 3 3 3 4 N
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started