generate.subsamples: Subsample Creation

View source: R/generate.subsamples.R

generate.subsamplesR Documentation

Subsample Creation

Description

A function that creates an array of subsamples of a dataset.

Usage

generate.subsamples(number.of.occurrences, fold, loocv.limit)

Arguments

number.of.occurrences

The number of occurrences of the species.

fold

The number of groups which should be created if the number of occurrences is greater than loocv.limit.

loocv.limit

The limit below which the subsamples are created for a leave-one-out-cross-validation instead of a k-fold-cross-validation.

Details

This routine creates subsamples of species occurrences based on the number of occurrences of the chosen species and the number of groups which should be created. If the number of occurrences of the chosen species is below the loocv.limit, the groups contain only one member and the fold value will be ignored. The subsamples can be used for a k-fold or leave-one-out-cross-validation.

Value

This function returns a grid which contains the subsamples.

Author(s)

Maximilian Lange, Sven Lautenbach

Examples

subsamples <- generate.subsamples(15,3,5)

sperich documentation built on July 26, 2023, 5:49 p.m.