I have a data set and would like caret to train and validate on a specific part of my data set only. I have two lists
train.ids <- list(T1=c(1,2,3), T2=c(4,5,6), T3=c(7,8,9))
and
test.ids <- list(T1=c(10,11,12), T2=c(13,14,15), T3=(16,17,18))
which correspond to the row indices in my data set. train.ids$T1
should be used for training, while test.ids$T1
should be used for testing. Same goes for T2 and T3.
I tried using
trainControl(method="cv", index=train.ids, indexOut=test.ids)
but this doesn't seem to be the correct way of using trainControl.
Any help is highly appreciated