View source: R/sperrorest_resampling.R
represampling_bootstrap | R Documentation |
represampling_bootstrap
draws a bootstrap random sample (with
replacement) from data
.
represampling_bootstrap( data, coords = c("x", "y"), nboot = nrow(data), repetition = 1, seed1 = NULL, oob = FALSE )
data |
|
coords |
vector of length 2 defining the variables in |
nboot |
Size of bootstrap sample |
repetition |
numeric vector: cross-validation repetitions to be
generated. Note that this is not the number of repetitions, but the indices
of these repetitions. E.g., use |
seed1 |
|
oob |
logical (default |
A represampling object. This is a (named) list containing
length(repetition)
. resampling objects. Each of these contains only one
list with indices of train
ing and test
samples. Indices are row indices
for data
.
data(ecuador) # only 10 bootstrap repetitions, normally use >=100: parti <- represampling_bootstrap(ecuador, repetition = 10) # plot(parti, ecuador) # careful: overplotting occurs # because some samples are included in both the training and # the test sample (possibly even multiple times)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.