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
strata
is provided whenmethod = "random"
ormethod = "bootstrap"
- logger
a Logger
Slots
method
The sampling strategy to use. The available options are:
'random'
random sampling
'cv'
k-fold cross-validation
'bootstrap'
bootstrap (sampling with replacement)
N
a length-one integer vector, the population size
n
a length-one integer vector, the sample size for
method = "random"
andmethod = "bootstrap"
k
a 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
N
balance
a length-one logical vector, whether to (try to) balance the strata frequency in the output sample. Used only if
strata
is provided whenmethod = "random"
ormethod = "bootstrap"
logger
a Logger