Code
res <- tune_cluster(wflow, resamples = folds, grid = grid, control = control,
metrics = metrics)
Message
i Fold1: preprocessor 1/3
v Fold1: preprocessor 1/3
i Fold1: preprocessor 1/3, model 1/3
v Fold1: preprocessor 1/3, model 1/3
i Fold1: preprocessor 1/3, model 1/3 (predictions)
i Fold1: preprocessor 1/3, model 2/3
v Fold1: preprocessor 1/3, model 2/3
i Fold1: preprocessor 1/3, model 2/3 (predictions)
i Fold1: preprocessor 1/3, model 3/3
v Fold1: preprocessor 1/3, model 3/3
i Fold1: preprocessor 1/3, model 3/3 (predictions)
i Fold1: preprocessor 2/3
v Fold1: preprocessor 2/3
i Fold1: preprocessor 2/3, model 1/3
v Fold1: preprocessor 2/3, model 1/3
i Fold1: preprocessor 2/3, model 1/3 (predictions)
i Fold1: preprocessor 2/3, model 2/3
v Fold1: preprocessor 2/3, model 2/3
i Fold1: preprocessor 2/3, model 2/3 (predictions)
i Fold1: preprocessor 2/3, model 3/3
v Fold1: preprocessor 2/3, model 3/3
i Fold1: preprocessor 2/3, model 3/3 (predictions)
i Fold1: preprocessor 3/3
v Fold1: preprocessor 3/3
i Fold1: preprocessor 3/3, model 1/3
v Fold1: preprocessor 3/3, model 1/3
i Fold1: preprocessor 3/3, model 1/3 (predictions)
i Fold1: preprocessor 3/3, model 2/3
v Fold1: preprocessor 3/3, model 2/3
i Fold1: preprocessor 3/3, model 2/3 (predictions)
i Fold1: preprocessor 3/3, model 3/3
v Fold1: preprocessor 3/3, model 3/3
i Fold1: preprocessor 3/3, model 3/3 (predictions)
i Fold2: preprocessor 1/3
v Fold2: preprocessor 1/3
i Fold2: preprocessor 1/3, model 1/3
v Fold2: preprocessor 1/3, model 1/3
i Fold2: preprocessor 1/3, model 1/3 (predictions)
i Fold2: preprocessor 1/3, model 2/3
v Fold2: preprocessor 1/3, model 2/3
i Fold2: preprocessor 1/3, model 2/3 (predictions)
i Fold2: preprocessor 1/3, model 3/3
v Fold2: preprocessor 1/3, model 3/3
i Fold2: preprocessor 1/3, model 3/3 (predictions)
i Fold2: preprocessor 2/3
v Fold2: preprocessor 2/3
i Fold2: preprocessor 2/3, model 1/3
v Fold2: preprocessor 2/3, model 1/3
i Fold2: preprocessor 2/3, model 1/3 (predictions)
i Fold2: preprocessor 2/3, model 2/3
v Fold2: preprocessor 2/3, model 2/3
i Fold2: preprocessor 2/3, model 2/3 (predictions)
i Fold2: preprocessor 2/3, model 3/3
v Fold2: preprocessor 2/3, model 3/3
i Fold2: preprocessor 2/3, model 3/3 (predictions)
i Fold2: preprocessor 3/3
v Fold2: preprocessor 3/3
i Fold2: preprocessor 3/3, model 1/3
v Fold2: preprocessor 3/3, model 1/3
i Fold2: preprocessor 3/3, model 1/3 (predictions)
i Fold2: preprocessor 3/3, model 2/3
v Fold2: preprocessor 3/3, model 2/3
i Fold2: preprocessor 3/3, model 2/3 (predictions)
i Fold2: preprocessor 3/3, model 3/3
v Fold2: preprocessor 3/3, model 3/3
i Fold2: preprocessor 3/3, model 3/3 (predictions)
Code
cars_res <- tune_cluster(helper_objects$kmeans_mod, ~z, resamples = data_folds,
grid = cars_grid, control = tune::control_grid(extract = function(x) {
1
}, save_pred = TRUE))
Message
x Fold1: preprocessor 1/1: Error in `get_all_predictors()`:
! The following predi...
x Fold2: preprocessor 1/1: Error in `get_all_predictors()`:
! The following predi...
Condition
Warning:
All models failed.
i See the `.notes` column.
Code
tune_cluster(helper_objects$rec_tune_1, helper_objects$kmeans_mod_no_tune,
rsample::vfold_cv(mtcars, v = 2))
Condition
Error in `tune_cluster()`:
! The first argument to `tune_cluster()` should be either a model or workflow.
Code
tune_cluster(mpg ~ ., helper_objects$kmeans_mod_no_tune, rsample::vfold_cv(
mtcars, v = 2))
Condition
Error in `tune_cluster()`:
! The first argument to `tune_cluster()` should be either a model or workflow.
Code
tune_cluster(wflow, resamples = folds, grid = 3, something = "wrong")
Condition
Warning:
The `...` are not used in this function but one or more objects were passed: 'something'
Output
# Tuning results
# 2-fold cross-validation
# A tibble: 2 x 4
splits id .metrics .notes
<list> <chr> <list> <list>
1 <split [16/16]> Fold1 <tibble [6 x 5]> <tibble [0 x 3]>
2 <split [16/16]> Fold2 <tibble [6 x 5]> <tibble [0 x 3]>
Code
tmp <- tune::show_best(res)
Condition
Warning in `tune::show_best()`:
No value of `metric` was given; "sse_within_total" will be used.
Code
tmp <- tune::select_best(res)
Condition
Warning in `tune::select_best()`:
No value of `metric` was given; "sse_within_total" will be used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.