Skip to content

Instantly share code, notes, and snippets.

@Harshit1694
Last active April 1, 2021 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Harshit1694/449771ddaa71af871bb85f14d9c5c743 to your computer and use it in GitHub Desktop.
Save Harshit1694/449771ddaa71af871bb85f14d9c5c743 to your computer and use it in GitHub Desktop.
#Splitting the data set into train and test
set.seed(2)
part <- sample(2, nrow(data), replace = TRUE, prob = c(0.7, 0.3))
train<- data[part == 1,]
test<- data[part == 2,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment