Code
bake(rec_trained, te_dat[, 2:3], all_predictors())
Condition
Error in `step_integer()`:
! The following required column is missing from `new_data`: x.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Integer encoding for: <none>
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Training information
Training data contained 32 data points and no incomplete rows.
-- Operations
* Integer encoding for: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 3
-- Operations
* Integer encoding for: all_predictors()
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 3
-- Training information
Training data contained 10 data points and 2 incomplete rows.
-- Operations
* Integer encoding for: x, y, z | Trained
Code
recipe(~ x + y + z, data = tr_dat) %>% step_integer(all_predictors(), strict = "yes") %>%
prep()
Condition
Error in `step_integer()`:
Caused by error in `prep()`:
! `strict` must be `TRUE` or `FALSE`, not the string "yes".
Code
recipe(~ x + y + z, data = tr_dat) %>% step_integer(all_predictors(),
zero_based = "sure!") %>% prep()
Condition
Error in `step_integer()`:
Caused by error in `prep()`:
! `zero_based` must be `TRUE` or `FALSE`, not the string "sure!".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.