Skip to content

Instantly share code, notes, and snippets.

@nopps07
Created March 12, 2021 09:10
Show Gist options
  • Save nopps07/a0214c37d654569d96c75ca8525d1662 to your computer and use it in GitHub Desktop.
Save nopps07/a0214c37d654569d96c75ca8525d1662 to your computer and use it in GitHub Desktop.
{r Train,Test split}
set.seed(123)
# we appoint 80% of the data as the train set, and 20% for the test set.
train_binwine <- sample(1:nrow(binwine), size=0.8*nrow(binwine), replace=F)
train <- binwine[train_binwine,]
test <- binwine[-train_binwine,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment