Skip to content

Commit aaf4928

Browse files
KNN to K-NN
1 parent 8bdc75e commit aaf4928

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/classification2.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,10 @@ we set the number of neighbors $K$ to 1, 7, 20, and 300.
11541154

11551155
### Evaluating on the test set
11561156

1157-
Now that we have tuned the KNN classifier and set $K =$ `r best_k`,
1157+
Now that we have tuned the K-NN classifier and set $K =$ `r best_k`,
11581158
we are done building the model and it is time to evaluate the quality of its predictions on the held out
11591159
test data, as we did earlier in Section \@ref(eval-performance-cls2).
1160-
We first need to retrain the KNN classifier
1160+
We first need to retrain the K-NN classifier
11611161
on the entire training data set using the selected number of neighbors.
11621162

11631163
```{r 06-eval-on-test-set-after-tuning, message = FALSE, warning = FALSE}

source/regression1.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,12 @@ Figure \@ref(fig:07-choose-k-knn-plot). What is happening here?
513513

514514
Figure \@ref(fig:07-howK) visualizes the effect of different settings of $K$ on the
515515
regression model. Each plot shows the predicted values for house sale price from
516-
our KNN regression model on the training data for 6 different values for $K$: 1, 3, 25, `r kmin`, 250, and 680 (almost the entire training set).
516+
our K-NN regression model on the training data for 6 different values for $K$: 1, 3, 25, `r kmin`, 250, and 680 (almost the entire training set).
517517
For each model, we predict prices for the range of possible home sizes we
518518
observed in the data set (here 500 to 5,000 square feet) and we plot the
519519
predicted prices as a blue line.
520520

521-
```{r 07-howK, echo = FALSE, warning = FALSE, fig.height = 13, fig.width = 10,fig.cap = "Predicted values for house price (represented as a blue line) from KNN regression models for six different values for $K$."}
521+
```{r 07-howK, echo = FALSE, warning = FALSE, fig.height = 13, fig.width = 10,fig.cap = "Predicted values for house price (represented as a blue line) from K-NN regression models for six different values for $K$."}
522522
gridvals <- c(1, 3, 25, kmin, 250, 680)
523523
524524
plots <- list()

0 commit comments

Comments
 (0)