1. Decision trees: Suppose that a pet adoption center wants to predict the type of a pet (cats vs dogs) based on two bin
Posted: Wed May 11, 2022 2:53 pm
1. Decision trees: Suppose that a pet adoption center wants to predict the type of a pet (cats vs dogs) based on two binary attributes: weight (heavy or light) and height (tall or short). We have a dataset of 2,000 pets, half cats and half dogs. 75% of the dogs are tall. 50% of the cats are light weight. All cats are short and no dogs are light weight. Given the log, approacimation table, answer the following questions number 1/8 1/4 1/3 3/8 3/7 1/2 4/7 5/8 2/3 3/4 7/8 -3 -2 -1.58 -1.42 -1.22 -0.81 -0.68 -0.88 -0.42 -0.19 log2 - 1 (a) What is the initial entropy in the system? (1) Compute the information gain of two scenarios for initially choosing the attribute weight, and for initially choosing attribute height in the decision tree classifier. (c) Based on yours answers, which attribute should be used as the root of the decision tree? Why? (d) How can the information gain beuristic that was originally designed for categorical attributes be gener alised to cope with contimuous attributes? For example, if we have real values for height: (0) A staff notes that some dogs in another branch are actually light-weight (think of terriers for example) To ensure a more accurate decision tree, she suggests adding another variable: the pets's unique ID number represented as an integer between 0 and one billion. Is this a good dea? Why or why not, assuming you are using the information gain heuristic for building the decision treo