> set.seed(1234) > ind <- sample(2, nrow(iris), replace=TRUE, prob=c(0.7, 0.3)) > trainData <- iris[ind==1,] > testData <- iris[ind==2,]   The above statements

Big Ideas Math A Bridge To Success Algebra 1: Student Edition 2015
1st Edition
ISBN:9781680331141
Author:HOUGHTON MIFFLIN HARCOURT
Publisher:HOUGHTON MIFFLIN HARCOURT
Chapter9: Solving Quadratic Functions
Section: Chapter Questions
Problem 4CA
icon
Related questions
icon
Concept explainers
Topic Video
Question
> set.seed(1234)
> ind <- sample(2, nrow(iris), replace=TRUE, prob=c(0.7, 0.3))
> trainData <- iris[ind==1,]
> testData <- iris[ind==2,]
 
The above statements perform the following process on iris dataset:

options:

 

Usually, before modeling, the iris data is split into two subsets: training (70%) and test (30%).

 

The iris data is split below into two subsets: training (30%) and test (70%).

 

It replaces the iris dataset with two subsets: training (the first) and test (the second).

 

It replaces the iris dataset with two subsets: training (70%) and test (30%).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Centre, Spread, and Shape of a Distribution
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Algebra
ISBN:
9781680331141
Author:
HOUGHTON MIFFLIN HARCOURT
Publisher:
Houghton Mifflin Harcourt
Glencoe Algebra 1, Student Edition, 9780079039897…
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL