NfoldCrossValidation: Specify a strategy for validation of a spatial model

View source: R/gmValidationStrategy.R

NfoldCrossValidationR Documentation

Specify a strategy for validation of a spatial model

Description

Specify a strategy to validate a spatial model. Currently only leave-one-out and n-fold cross-validation are available, each specified by its own function. Leave-one-out takes no parameter.

Usage

NfoldCrossValidation(nfolds = 2, doAll = TRUE, ...)

Arguments

nfolds

Either, one integer between 2 and the number of hard conditioning data, specifying how many groups do you want to split the data available; or else a factor specifying these groups

doAll

boolean; should each group be used once for validating the model constructed with the remaining groups; else, only the first group will be used for validation, and the other will be used for training.

...

ignored

Value

An object, a list with an appropriate class, controlling the strategy specified. This can be of class "NfoldCrossValidation" or of class c("LeaveOneOut", "NfoldCrossValidation").

See Also

Other validation functions: LeaveOneOut, validate()

Examples

NfoldCrossValidation(nfolds=5, doAll=FALSE)

gmGeostats documentation built on April 18, 2023, 5:08 p.m.