as.represampling: Resampling objects with repetition, i.e. sets of...

Description Usage Arguments Details Value See Also Examples

View source: R/sperrorest_misc.R

Description

Functions for handling represampling objects, i.e. lists of resampling objects.

Usage

1
2
3
4
5
6
7
8
9
as.represampling(object, ...)

## S3 method for class 'list'
as.represampling(object, ...)

## S3 method for class 'represampling'
print(x, ...)

is_represampling(object)

Arguments

object

object of class represampling, or a list to be coerced to this class.

...

currently not used.

x

object of class represampling.

Details

represampling objects are (names) lists of resampling objects. Such objects are typically created by partition_cv, partition_kmeans, represampling_disc_bootstrap and related functions.

In r-repeated k-fold cross-validation, for example, the corresponding represampling object has length r, and each of its r resampling objects has length k.

as.resampling_list coerces object to class represampling while coercing its elements to resampling objects. Some validity checks are performed.

Value

as.represampling methods return an object of class represampling with the contents of object.

See Also

resampling, partition_cv, partition_kmeans, represampling_disc_bootstrap, etc.

Examples

1
2
3
4
5
6
7
8
9
data(ecuador) # Muenchow et al. (2012), see ?ecuador
# Partitioning by elevation classes in 200 m steps:
fac <- factor( as.character( floor( ecuador$dem / 300 ) ) )
summary(fac)
parti <- as.resampling(fac)
# a list of lists specifying sets of training and test sets,
# using each factor at a time as the test set:
str(parti)
summary(parti)

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