# CGGPvalstats: Calculate stats for CGGP prediction on validation data In CollinErickson/CGGP: Composite Grid Gaussian Processes

## Description

Calculate stats for CGGP prediction on validation data

## Usage

 `1` ```CGGPvalstats(CGGP, Xval, Yval, bydim = TRUE, ...) ```

## Arguments

 `CGGP` CGGP object `Xval` X validation matrix `Yval` Y validation data `bydim` If multiple outputs, should it be done separately by dimension? `...` Passed to valstats, such as which stats to calculate.

data frame

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```SG <- CGGPcreate(d=3, batchsize=100) f1 <- function(x){x[1]+x[2]^2} y <- apply(SG\$design, 1, f1) SG <- CGGPfit(SG, y) Xval <- matrix(runif(3*100), ncol=3) Yval <- apply(Xval, 1, f1) CGGPvalstats(CGGP=SG, Xval=Xval, Yval=Yval) # Multiple outputs SG <- CGGPcreate(d=3, batchsize=100) f1 <- function(x){x[1]+x[2]^2} f2 <- function(x){x[1]^1.3+.4*sin(6*x[2])+10} y1 <- apply(SG\$design, 1, f1)#+rnorm(1,0,.01) y2 <- apply(SG\$design, 1, f2)#+rnorm(1,0,.01) y <- cbind(y1, y2) SG <- CGGPfit(SG, Y=y) Xval <- matrix(runif(3*100), ncol=3) Yval <- cbind(apply(Xval, 1, f1), apply(Xval, 1, f2)) CGGPvalstats(SG, Xval, Yval) CGGPvalstats(SG, Xval, Yval, bydim=FALSE) ```

CollinErickson/CGGP documentation built on May 14, 2021, 4:33 a.m.