View source: R/sperrorest_resampling.R
plot.represampling | R Documentation |
plot.represampling
displays the partitions or samples
corresponding arising from the resampling of a data set.
## S3 method for class 'represampling' plot(x, data, coords = c("x", "y"), pch = "+", wiggle_sd = 0, ...) ## S3 method for class 'resampling' plot(x, ...)
x |
a represampling resp. resampling object. |
data |
a |
coords |
vector of length 2 defining the variables in |
pch |
point symbol (to be passed to points). |
wiggle_sd |
'wiggle' the point locations in x and y direction to avoid overplotting of samples drawn multiple times by bootstrap methods; this is a standard deviation (in the units of the x/y coordinates) of a normal distribution and defaults to 0 (no wiggling). |
... |
additional arguments to plot. |
This function is not intended for samples obtained by resampling with replacement (e.g., bootstrap) because training and test points will be overplotted in that case. The size of the plotting region will also limit the number of maps that can be displayed at once, i.e., the number of rows (repetitions) and fields (columns).
data(ecuador) # non-spatial cross-validation: resamp <- partition_cv(ecuador, nfold = 5, repetition = 1:2) # plot(resamp, ecuador) # spatial cross-validation using k-means clustering: resamp <- partition_kmeans(ecuador, nfold = 5, repetition = 1:2) # plot(resamp, ecuador)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.