Let's say I'm using the
Sonar data and I'd like to make a hold-out validation in R. I partitioned the data using the
caret package as
folds <- createFolds(mydata$Class, k=5).
I would like then to use exactly the fold
mydata[i] as test data and train a classifier using
mydata[-i] as train data.
My first thought was to use the
train function, but I couldn't find any support for hold-out validation. I mean, I don't want to partition my data and then test all the combinations for estimating the mean accuracy, I want to train it only once. Am I missing something here?
Also, I'd like to be able to use exactly the pre-defined folds as parameter, instead of letting the function partition the data. Does anyone have any thoughts?
Thanks in advance