b) Identify the first splitting attribute for decision tree by using ID3 algorithm with the following dataset. [8] A B C Y 1 30 25 0 1 30 75 0 2 30 25 1 3 30 25 0 3 25 30 1 2 25 75 0 3 25 75 1 1 30 30 0 1 30 25 1 3 25 25 1 1 25 75 0 2 30 75 1 2 25 25 1 3 30 30 0 1 30 75 1 2 25 75 0 Input: A, B, C Output: Y
Added by Jill P.
Close
Step 1
Entropy(Y) = -p(0)log2p(0) - p(1)log2p(1) Where p(0) and p(1) are the proportions of 0s and 1s in the target attribute respectively. Show more…
Show all steps
Your feedback will help us improve your experience
Roee Shalom and 87 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Consider the following data training dataset: Calculate the information gain when splitting on A and B. Which attribute would the decision tree induction algorithm choose?
Adi S.
Problem Five: (40 points) Consider the following data set comprised of three binary input attributes (A1, A2, and A3) and one binary output Y. Example: A1 A2 A3 Y x1 0 0 No x2 1 0 No x3 0 1 0 No x4 1 -1 Yes x5 1 Yes a) What is the number of possible combinations? b) Use the decision tree learning algorithm to train a classification decision tree for the 5 examples. Show the computations made to determine the attribute to split at each node. c) Test the performance of the trained decision tree to determine Y. What is the percentage of correct matches?
Consider the following dataset: If we train a decision tree with the above data, what feature will we split on at the root? a) X1 b) X3 c) X2 d) Any of these can be chosen
Wasim N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD