Re: [R] caret() train based on cross validation - split dataset to keep sites together?

2012-05-30 Thread Max Kuhn
Tyrell, If you want to have the folds contain data from only one site at a time, you can develop a set of row indices and pass these to the index argument in trainControl. For example index = list(site1 = c(1, 6, 8, 12), site2 = c(120, 152, 176, 178), site3 = c(754, 789, 981)) The first fold

[R] caret() train based on cross validation - split dataset to keep sites together?

2012-05-30 Thread Tyrell Deweber
Hello all, I have searched and have not yet identified a solution so now I am sending this message. In short, I need to split my data into training, validation, and testing subsets that keep all observations from the same sites together – preferably as part of a cross validation procedure. Now fo