cv_folding {autoMrP}R Documentation

Generates folds for cross-validation

Description

cv_folding creates folds used in classifier training within the survey data.

Usage

cv_folding(data, L2.unit, k.folds, cv.sampling = c("individuals", "L2 units"))

Arguments

data

The survey data; must be a tibble.

L2.unit

The column name of the factor variable identifying the context-level unit

k.folds

An integer value indicating the number of folds to be generated.

cv.sampling

Cross-validation sampling method. A character-valued scalar indicating whether cross-validation folds should be created by sampling individual respondents (individuals) or geographic units (L2 units). Default is L2 units. Note: ignored if folds is provided, but must be specified otherwise.

Value

Returns a list with length specified by k.folds argument. Each element is a tibble with a fold used in k-fold cross-validation.


[Package autoMrP version 1.0.6 Index]