An S4 class to represent a sampling methodology.
The object consists of 7 slots
Constructor for the S4 Sampler object.
Arguments
- method
The sampling strategy to use. The available options are:
'random'random sampling
'cv'k-fold cross-validation
'bootstrap'bootstrap (sampling with replacement)
- N
the population size
- n
the sample size for
method = "random"andmethod = "bootstrap"- k
the number of folds for
method = "cv", or the number of repeats formethod = "random"andmethod = "bootstrap"- strata
(optional) vector of stratification variables. If provided must be of length
N- balance
logical, whether to (try to) balance the strata frequency in the output sample. Used only if
stratais provided whenmethod = "random"ormethod = "bootstrap"- logger
a Logger
Slots
methodThe sampling strategy to use. The available options are:
'random'random sampling
'cv'k-fold cross-validation
'bootstrap'bootstrap (sampling with replacement)
Na length-one integer vector, the population size
na length-one integer vector, the sample size for
method = "random"andmethod = "bootstrap"ka length-one integer vector, the number of folds for
method = "cv", or the number of repeats formethod = "random"andmethod = "bootstrap"strata(optional) vector of stratification variables. If provided must be of length
Nbalancea length-one logical vector, whether to (try to) balance the strata frequency in the output sample. Used only if
stratais provided whenmethod = "random"ormethod = "bootstrap"loggera Logger