Exercise 1
Table is to be used to build a decision tree to classify whether a patient has a cold or flu. As part of this process the Fever column is being considered as a splitting point.
Two potential splitting values are being considered:
a. Where the data is divided into two sets where (1) Fever is none and (2) Fever is mild and severe.
b. Where the data is divided into two sets where (1) Fever is severe and (2) Fever is none and mild.
Calculate, using the entropy impurity calculation, the gain for each of these splits.
Exercise 2
A kNN model is being used to predict house prices. A training set was used to generate a kNN model and k is determined to be 5. The unseen observation in Table 7.24 is presented to the model. The kNN model determines the five observations in Table 7.25 from the training set to be the most similar. What would be the predicted house price value?