I need to create a custom resampling method in R package caret where: For each leave-pair-out-cross-validation, from the training set I derive new data using a function I implemented. Then it is used as training set, and tested against the 2 instances left out. In the next iteration new data will be derived from the new training set resampled.
In the caret custom models manual page it is showed how to make a custom model but I would like to make a custom resampling method in the trainControl function that can be used with any train model. Is that possible in caret ?
So to recap, I need some sort of LGOCV that for each iteration takes the input training set and transforms it in a new dataframe with a function I created that will be used as actual training.