Nothing
Code
prep(step_smoten(recipe(class ~ x, data = df), class, neighbors = 5))
Condition
Error in `step_smoten()`:
Caused by error in `bake()`:
! The minority class "min" does not have enough observations to perform SMOTEN.
i 3 observations were found, but 6 are needed.
Code
prep(step_smoten(recipe(class ~ x, data = df), class))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! All predictor columns for this function should be categorical (factor or character). Non-categorical column found: `x`.
Code
prep(step_smoten(recipe(~., data = df), class, id))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! The selector should select at most a single variable.
Code
prep(step_smoten(recipe(class ~ x + y, data = df), class))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! Cannot have any missing values. NAs found in x.
Code
step_smoten(recipe(class ~ x + y, data = cat_example), class, indicator_column = 1)
Condition
Error in `step_smoten()`:
! `indicator_column` must be a single string or `NULL`, not the number 1.
Code
prep(step_smoten(recipe(class ~ x + y, data = cat_example), class,
indicator_column = ""))
Condition
Error in `step_smoten()`:
! `indicator_column` must be a single string or `NULL`, not the empty string "".
Code
prep(step_smoten(recipe(class ~ x + y, data = cat_example), class,
indicator_column = "x"))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! Name collision occurred. The following variable names already exist:
* `x`
Code
prep(step_smoten(recipe(class ~ x + y, data = cat_example), over_ratio = "yes"))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! `over_ratio` must be a number, not the string "yes".
Code
prep(step_smoten(recipe(class ~ x + y, data = cat_example), neighbors = TRUE))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! `neighbors` must be a whole number, not `TRUE`.
Code
step_smoten(recipe(class ~ x + y, data = cat_example), seed = TRUE)
Condition
Error in `step_smoten()`:
! `seed` must be a whole number, not `TRUE`.
Code
res <- bake(prep(step_smoten(recipe(class ~ x + y, data = cat_example), class)),
new_data = NULL)
Condition
Warning in `prep()`:
Unused factor level "unused" in `class` was dropped.
i Level with zero observations is skipped when computing sampling targets.
over_ratio names when prepped (#323)Code
prep(step_smoten(recipe(class ~ ., data = df), class, over_ratio = c(a = 1,
potato = 1)))
Condition
Error in `step_smoten()`:
Caused by error in `prep()`:
! `over_ratio` names must be levels of the outcome.
x Unknown name: "potato".
i Available levels: "a", "b", and "c".
Code
bake(trained, new_data = cat_example[, -3])
Condition
Error in `step_smoten()`:
! The following required column is missing from `new_data`: class.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 2
-- Operations
* SMOTEN based on: <none>
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 2
-- Training information
Training data contained 400 data points and no incomplete rows.
-- Operations
* SMOTEN based on: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 2
-- Operations
* SMOTEN based on: class
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 2
-- Training information
Training data contained 400 data points and no incomplete rows.
-- Operations
* SMOTEN based on: class | Trained
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.