Figure 5.33 gives the JMP output obtained when k-nearest neighbors is applied to the Fresh detergent demand data. a-1. F
Posted: Wed Jul 06, 2022 12:14 pm
FIGURE 5.33 The 6 Nearest Neighbors to Observation 1, RMSE Values, and Predictions in the k-Nearest Neighbors Fresh Detergent Demand Exercise 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 RowNear 1 4 RowNear 4 RowNear 5 8 29 PriceDif -0.05 0.25 0.60 0.00 0.25 0.20 0.15 0.05 -0.15 0.15 0.20 0.10 0.40 0.45 0.35 0.30 0.50 0.50 0.40 -0.05 -0.05 -0.10 0.20 0.10 0.50 0.60 -0.05 0.00 RowNear 2 RowNear 3 28 9 0.05 0.55 0.30 0.10 AdvExp 5.50 6.75 7.25 5.50 7.00 6.50 6.75 5.25 5.25 6.00 6.50 6.25 7.00 6.90 6.80 6.80 7.10 7.00 6.80 6.50 6.25 6.00 6.50 7.00 6.80 6.80 6.50 5.75 5.80 6.80 6.90 6.40 RowNear 6 22 Demand 7.38 8.51 9.52 7.50 9.33 8.28 8.75 7.87 7.10 8.00 7.89 8.15 9.10 8.86 8.90 8.87 9.26 9.00 8.75 7.95 7.65 7.27 8.00 8.50 8.75 9.21 8.27 7.67 7.93 9.26 K Count 1 2 3 4 5 6 7 8 30 30 30 30 30 30 30 30 Predicted Demand 6 7.5566666667 8.67 9.0566666667 7.5366666667 8.7716666667 8.3616666667 8.4183333333 7.5966666667 7.6033333333 7.9866666667 8.4266666667 7.9616666667 8.94 8.96 8.9033333333 8.89 9.0816666667 8.9966666667 8.9133333333 8.0983333333 7.8733333333 7.8083333333 8.4083333333 8.605 9.0566666667 9.1083333333 8.045 7.6216666667 7.6616666667 8.9716666667 RMSE 0.29283 0.31029 0.29055 0.31371 0.30562 0.27685 0.28662 0.30393 SSE 2.5724 2.88835 2.53259 2.95246 2.80211 2.29938* 2.46448 2.77111 Predicted Formula Demand 6 7.575 8.7733333333 9.185 7.575 8.91 8.2633333333 8.3216666667 7.575 7.575 7.9866666667 8.2633333333 7.995 8.9783333333 8.9533333333 8.8316666667 8.91 9.0816666667 9.0383333333 8.8716666667 8.0066666667 7.87 7.6416666667 8.2633333333 8.7066666667 8.9716666667 9.0566666667 8.0066666667 7.625 7.625 9.0566666667 8.91 8.17