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

View source: R/sperrorest_misc.R

as.represamplingR Documentation

Resampling objects with repetition, i.e. sets of partitionings or bootstrap samples

Description

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

Usage

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

# 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 Oct. 16, 2022, 5:05 p.m.