## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## 7.8 EXERCISES

1. A classification prediction model was built using a training set of examples. A separate test set of 20 examples is used to test the model. Table 7.21 shows the results of applying this test set. Calculate the model's:
1. Concordance
2. Error rate
3. Sensitivity
4. Specificity

Table 7.21. Table of actual vs predicted values (categorical response)

2. A regression prediction model was built using a training set of examples. A separate test set was applied to the model and the results are shown in Table 7.22.
1. Determine the quality of the model using r2
2. Calculate the residual for each observation
3. Table 7.23 shows the relationship between the amount of fertilizer used and the height of a plant.
1. Calculate a simple linear regression equation using Fertilizer as the descriptor and Height as the response.
2. Predict the height when fertilizer is 12.3
4. 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?
5. A classification tree model is being used to predict which brand of printer a customer would purchase with a computer. The tree in Figure 7.36 was built from a training set of examples. For a customer ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required