library(dplyr)
library(dials)
library(parsnip)
## -----------------------------------------------------------------------------
## No ability to exploit submodels:
svm_spec <-
svm_poly(cost = tune(), degree = tune()) %>%
set_engine("kernlab") %>%
set_mode("regression")
svm_grid <-
svm_spec %>%
extract_parameter_set_dials() %>%
grid_regular(levels = 3)
min_grid(svm_spec, svm_grid)
## -----------------------------------------------------------------------------
## Can use submodels
xgb_spec <-
boost_tree(trees = tune(), min_n = tune()) %>%
set_engine("xgboost") %>%
set_mode("regression")
xgb_grid <-
xgb_spec %>%
extract_parameter_set_dials() %>%
grid_regular(levels = 3)
min_grid(xgb_spec, xgb_grid)
Run the code above in your browser using DataLab