This implements the Nested CV resampling procedure by Bates et al. (2024).
References
Bates, Stephen, Hastie, Trevor, Tibshirani, Robert (2024).
“Cross-validation: what does it estimate and how well does it do it?”
Journal of the American Statistical Association, 119(546), 1434–1445.
Active bindings
iters
(integer(1)
)
The total number of resampling iterations.
Methods
Inherited methods
Method new()
Creates a new instance of this R6 class.
Method unflatten()
Convert a resampling iteration to a more useful representation.
For outer resampling iterations, inner
is NA
.
Usage
ResamplingNestedCV$unflatten(iter)
Arguments
iter
(integer(1)
)
The iteration.
Returns
list(rep, outer, inner)
Method clone()
The objects of this class are cloneable with this method.
Usage
ResamplingNestedCV$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
ncv = rsmp("nested_cv", folds = 3, repeats = 10L)
ncv
#> <ResamplingNestedCV>: Nested CV
#> * Iterations: 90
#> * Instantiated: FALSE
#> * Parameters: folds=3, repeats=10
rr = resample(tsk("mtcars"), lrn("regr.featureless"), ncv)