CV | R Documentation |
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
CV(gp, predictObserved = TRUE, verbose = FALSE)
gp |
an object of type |
predictObserved |
if |
verbose |
if |
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
Garrett M. Dancik dancikg@easternct.edu
https://github.com/gdancik/mlegp
predict.gp
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.