Code
decision_tree(cost_complexity = 0.1) %>% set_engine("rpart", model = FALSE) %>%
update(cost_complexity = tune(), model = tune())
Output
Decision Tree Model Specification (unknown mode)
Main Arguments:
cost_complexity = tune()
Engine-Specific Arguments:
model = tune()
Computational engine: rpart
"bogus" is not a known mode for model `decision_tree()`.
Please set the mode in the model specification (`?parsnip::model_spec()`).
Please set the mode in the model specification (`?parsnip::model_spec()`).
Code
try(translate(decision_tree(), engine = NULL), silent = TRUE)
Message
Used `engine = 'rpart'` for translation.
Code
f_fit <- spec %>% fit(body_mass_g ~ ., data = penguins)
Condition
Warning:
! 1000 samples were requested but there were 333 rows in the data.
i 333 samples will be used.
Code
xy_fit <- spec %>% fit_xy(x = penguins[, -6], y = penguins$body_mass_g)
Condition
Warning:
! 1000 samples were requested but there were 333 rows in the data.
i 333 samples will be used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.