Code
bake(rec_trained, new_data = ex_dat[, 1:3])
Condition
Error in `step_inverse()`:
! The following required column is missing from `new_data`: x4.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Inverse transformation on: <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
* Inverse transformation on: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 5
-- Operations
* Inverse transformation on: x1, x2, x3, x4
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 5
-- Training information
Training data contained 20 data points and no incomplete rows.
-- Operations
* Inverse transformation on: x1, x2, x3, x4 | Trained
Code
recipe(~., data = ex_dat) %>% step_inverse(x1, x2, x3, x4, offset = function(x)
x / 3) %>% prep()
Condition
Error in `step_inverse()`:
Caused by error in `prep()`:
! `offset` must be a number, not a function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.