# \donttest{
data("example_ames_knn")
library(parsnip)
knn_model <-
nearest_neighbor(
mode = "regression",
neighbors = tune("K"),
weight_func = tune(),
dist_power = tune()
) %>%
set_engine("kknn")
lowest_rmse <- select_best(ames_grid_search, metric = "rmse")
lowest_rmse
knn_model
finalize_model(knn_model, lowest_rmse)
# }
Run the code above in your browser using DataLab