resamplingsByVariable: Create identical samples or resample by specific selector...

Description Usage Arguments Details Value References See Also Examples

Description

This function creates n sets of identical resamples or resamplings where the rows of a data frame are sampled based on a specific selector variable. The selector variable is defined in the meta information layer of the gpm object. Within each sample, only m samples for each unique value of the selector variable are selected.

Usage

1
2
3
4
5
6
7
## S4 method for signature 'GPM'
resamplingsByVariable(x, use_selector = FALSE, grabs = 1,
  resample = 100)

## S4 method for signature 'data.frame'
resamplingsByVariable(x, resample = 100,
  use_selector = FALSE, selector = NULL, grabs = 1)

Arguments

x

An object of class gpm or data.frame

use_selector

Use the selector variable for splitting the samples into training or testing (default FALSE).

grabs

The number m of samples per unique selector value

resample

The number n of resamplings computed

selector

The column name of the selector variable. Only relevant if use_selector is TRUE.

Details

The resamplings do not contain the actual data values but the row numbers indicating which rows should be selected from the supplied data layer during later processing steps.

Value

A layer within the gpm object with the information on the n individual resamplings.

A list of length n with the individual resamplings.

References

splitMultResp for splitting the samples into training and testing subsets.

See Also

NONE

Examples

1
2
3
4
## Not run: 
#Not run

## End(Not run)

environmentalinformatics-marburg/gpm documentation built on July 11, 2020, 11:12 a.m.