Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Decision trees (by hand) (25 points): Construct a decision tree by hand for the dataset given below (the dataset is simulated and does not
1. Decision trees (by hand) (25 points): Construct a decision tree by hand for the dataset given below (the dataset is simulated and does not represent the real world). The target variable is Mammal. For each node, show the entropy/information in the data set and the potential gain for each possible attribute. Also, show the final tree.
Name Body Temperature Gives Birth Four-Legged Mammal Porcupine warm-blooded Y Y Y Cat warm-blooded Y Y Y Bat warm-blooded Y IN N Whale warm-blooded Y N Salamander cold-blooded N Y IN Komodo Dragon cold-blooded Y N Python cold-blooded N N V Salmon cold-blooded N N Eagle warm-blooded N N N Guppy cold-blooded Y IN IN Human warm-blooded Y N Pigeon warm-blooded N IN IN Elephant papoolq-WJEM Y Y Y Leopard Shark cold-blooded Y N N Turtle cold-blooded N Y Penguin cold-blooded N IN N Eel cold-blooded N N N Dolphin warm-blooded N N Spiny Anteater warm-blooded Ny Y Gila Monster cold-blooded N Y Y Hint: Compute the Entropy for the root node Calculate the entropy for each of the 3 variables (Body Temperature, Gives Birth and Four Legged) Compute the entropy gain in each of the 3 cases and then select the first split based on the highest entropy gain. Continue this process till you only have terminal nodes Finally build a tree with the rules you have selected An example table is given below Attribute Entropy Branch One Entropy Branch Two Entropy Gain Body Warm Blooded = xxx Cold Blooded = xxx XXX Temperature Gives Birth Yes = XXX No = XXX XXX Four Legged Yes = XXX No = XXX XXX Highest Entropy Gain is for the attribute xxx. This attribute will be selected firstStep 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