finalize_model | R Documentation |
The finalize_*
functions take a list or tibble of tuning parameter values and
update objects with those values.
finalize_model(x, parameters)
finalize_recipe(x, parameters)
finalize_workflow(x, parameters)
x |
A recipe, |
parameters |
A list or 1-row tibble of parameter values. Note that the
column names of the tibble should be the |
An updated version of x
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.