CV {mlegp}R Documentation

Gaussian process cross-validation

Description

For a Gaussian process, calculates cross-validated predictions and the variance of cross-validated predictions for all points of the design. These are cross-validated in the sense that when predicting output at design point x, all observations at x are removed from the collection of observed outputs

Usage

CV(gp, predictObserved = TRUE, verbose = FALSE)

Arguments

gp an object of type gp
predictObserved if TRUE (the default), the variance of a predicted observation is calculated (and a nugget term is added); if FALSE, the variance of a predicted mean response is calculated (and a nugget term is NOT added)
verbose if TRUE, status is displayed following the cross-validation of each observation

Value

a matrix where the first column corresponds to the cross-validated predictions and the second column corresponds to the variance of the cross-validated predictions

Author(s)

Garrett M. Dancik dancikg@nsula.edu

References

http://users.nsula.edu/dancikg/mlegp/

See Also

predict.gp

Examples


## fit a single Gaussian process ##
x = -5:5; y1 = sin(x) + rnorm(length(x),sd=.1)
fit1 = mlegp(x, y1)

cv = CV(fit1)  ## note that cv is the same as fit1$cv


[Package mlegp version 2.2.6 Index]