tests/testthat/_snaps/tomek.md

bad data

Code
  prep(step_smote(rec, x))
Condition
  Error in `step_smote()`:
  Caused by error in `prep()`:
  ! `x` should be a factor variable.
Code
  prep(step_smote(rec, class, id))
Condition
  Error in `step_smote()`:
  Caused by error in `prep()`:
  ! The selector should select at most a single variable.

errors if character are present

Code
  prep(step_tomek(recipe(~., data = df_char), x))
Condition
  Error in `step_tomek()`:
  Caused by error in `prep()`:
  x All columns selected for the step should be double or integer.
  * 1 factor variable found: `y`

NA in response

Code
  prep(step_tomek(recipe(Status ~ Age, data = credit_data0), Status))
Condition
  Error in `step_tomek()`:
  Caused by error in `prep()`:
  ! Cannot have any missing values. NAs found in Status.

bad args

Code
  step_tomek(recipe(~., data = mtcars), seed = TRUE)
Condition
  Error in `step_tomek()`:
  ! `seed` must be a whole number, not `TRUE`.

bake method errors when needed non-standard role columns are missing

Code
  bake(trained, new_data = circle_example[, -3])
Condition
  Error in `step_tomek()`:
  ! The following required column is missing from `new_data`: class.

empty printing

Code
  rec
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:    1
  predictor: 10

  -- Operations 
  * Tomek based 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 
  * Tomek based on: <none> | Trained

printing

Code
  print(rec)
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:   1
  predictor: 2

  -- Operations 
  * Tomek 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 
  * Tomek based on: class | Trained


tidymodels/themis documentation built on July 4, 2025, 8:37 p.m.