Skip to content

Instantly share code, notes, and snippets.

@Harshit1694 Harshit1694/split_kNN.R
Last active Jun 27, 2019

Embed
What would you like to do?
#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
You can’t perform that action at this time.