plot.represampling: Plot spatial resampling objects

Description Usage Arguments Note Examples

View source: R/sperrorest_resampling.R

Description

plot.represampling displays the partitions or samples corresponding arising from the resampling of a data set.

Usage

1
2
3
4
5
6
## S3 method for class 'represampling'
plot(x, data, coords = c("x", "y"), pch = "+",
  wiggle_sd = 0, ...)

## S3 method for class 'resampling'
plot(x, ...)

Arguments

x

a represampling resp. resampling object.

data

a data.frame of samples containing at least the x and y coordinates of samples as specified by coords.

coords

vector of length 2 defining the variables in data that contain the x and y coordinates of sample locations.

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.

Note

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).

Examples

1
2
3
4
5
6
7
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)

sperrorest documentation built on Nov. 17, 2017, 4:28 a.m.