Skip to content

Instantly share code, notes, and snippets.

@topepo
Created March 30, 2020 23:32
Show Gist options
  • Save topepo/90a988f6652568a750b555533fb5d02d to your computer and use it in GitHub Desktop.
Save topepo/90a988f6652568a750b555533fb5d02d to your computer and use it in GitHub Desktop.
# devtools::install_dev("rsample")
library(tidymodels)
set.seed(252)
first_split <- initial_split(iris, p = 8/10)
test <- testing(first_split)
nrow(test)
others <- training(first_split)
val_resample <- validation_split(others, p = 8/10)
val_resample
# 97 in training set, 23 in validation set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment