tests/testthat/_snaps/sample.md

bad input

Code
  iris_rec %>% step_sample(size = -1)
Condition
  Error in `step_sample()`:
  ! `size` should be a positive number or NULL.
Code
  iris_rec %>% step_sample(size = "a")
Condition
  Error in `step_sample()`:
  ! `size` should be a positive number or NULL.
Code
  iris_rec %>% step_sample(replace = "a")
Condition
  Error in `step_sample()`:
  ! `replace` should be a single logical.

sample with case weights

Code
  rec
Message

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

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

  -- Training information 
  Training data contained 32 data points and no incomplete rows.

  -- Operations 
  * Row sampling: <none> | Trained, weighted
Code
  rec
Message

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

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

  -- Training information 
  Training data contained 32 data points and no incomplete rows.

  -- Operations 
  * Row sampling: <none> | Trained, weighted

empty printing

Code
  rec
Message

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

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

  -- Operations 
  * Row sampling: <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 
  * Row sampling: <none> | Trained

printing

Code
  print(rec)
Message

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

  -- Inputs 
  Number of variables by role
  predictor: 5

  -- Operations 
  * Row sampling: <none>
Code
  prep(rec)
Message

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

  -- Inputs 
  Number of variables by role
  predictor: 5

  -- Training information 
  Training data contained 150 data points and no incomplete rows.

  -- Operations 
  * Row sampling: <none> | Trained


Try the recipes package in your browser

Any scripts or data that you put into this service are public.

recipes documentation built on Aug. 26, 2023, 1:08 a.m.