subject

First let us create an even split of the data into train and test partitions using createDataPartition. The code with a missing line is given below: set. seed(2)
# line of code
test <- iris[test_index,]
train <- iris[-test_index,]

Which code should be used in place of # line of code above?

a. test_index <- createDataPartition(y, times=1,p=0.5)
b. test_index <- sample(2,length(y),replace=FALSE) c. test_index <- createDataPartition(y, times=1,p=0.5,list=FALSE)
d. test_index <- rep(1,length(y))

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How do i copy and paste equations and pictures like math graphs, to post on this site to get my questions answered?
Answers: 2
question
Computers and Technology, 25.06.2019 08:20
In the following table, column a is column b is and column c is
Answers: 1
You know the right answer?
First let us create an even split of the data into train and test partitions using createDataPartiti...
Questions
question
Mathematics, 25.02.2020 03:00
question
History, 25.02.2020 03:01
question
Mathematics, 25.02.2020 03:01
question
Mathematics, 25.02.2020 03:01
Questions on the website: 13722363