In: Statistics and Probability
Using R program and with a For loop.
Assuming a data set of 1000 observations and 10 predictors. How would one use a for loop to cycle through different proportions of training and test sizes.
For example,
20% of data goes to training and 80% for test in first iteration. Each iteration adding another 10% to the training set. So first set= (20% train, 80% test), second set = (30% train, 70% test), third set= (40% train,60%test) and so on.
How would something like this be done in R programming language with a For loop so there is 7 samples.