crossval: Cross-validation

View source: R/crossval.R

crossvalR Documentation

Cross-validation

Description

Applies a cross-validation of DS results, using the same strategy as in the DS exercise. Any step-wise screening is applied for each iteration independently of that used to identify the subset of skillful predictors in the original analysis. The model coeffiecients (beta) is saved for each iteration, and both correlation and root-mean-squared-error are returned as scores.

Usage

crossval(x, m = 5, verbose = FALSE, ...)

Arguments

x

The results from DS.

m

window with - leave m-out for each iteration. There are also some pre-set options: 'cordex-esd-exp1', 'value-exp1', and 'loo' for experiments defined at CORDEX-ESD, COST-VALUE, and leave-one-out ('loo') cross-validation.

verbose

if TRUE print progress

...

additional arguments

Details

crossval.dsensemble will make use of the evaluation attribute with cross-validation results and returns the correlation.

Value

Cross-validation object.

Examples

data(Oslo)
t2m <- t2m.DNMI(lon=c(-20,40),lat=c(45,65))
eof <- EOF(t2m)

ds <- DS(Oslo,eof)
xv <- crossval(ds)
plot(xv)


metno/esd documentation built on March 9, 2024, 11:21 a.m.