library(dplyr)
library(tibble)
# For grid search:
data("example_ames_knn")
## -----------------------------------------------------------------------------
# select all combinations using the 'rank' weighting scheme
ames_grid_search %>%
collect_metrics()
filter_parameters(ames_grid_search, weight_func == "rank") %>%
collect_metrics()
rank_only <- tibble::tibble(weight_func = "rank")
filter_parameters(ames_grid_search, parameters = rank_only) %>%
collect_metrics()
## -----------------------------------------------------------------------------
# Keep only the results from the numerically best combination
ames_iter_search %>%
collect_metrics()
best_param <- select_best(ames_iter_search, metric = "rmse")
ames_iter_search %>%
filter_parameters(parameters = best_param) %>%
collect_metrics()
Run the code above in your browser using DataLab