predict.CGGP {CGGP} | R Documentation |
S3 predict method for CGGP
Description
Passes to CGGPpred
Predict using SG with y values at xp? Shouldn't y values already be stored in SG?
Usage
## S3 method for class 'CGGP'
predict(object, xp, ...)
CGGPpred(CGGP, xp, theta = NULL, outdims = NULL)
Arguments
object |
CGGP object |
xp |
x value to predict at |
... |
Other arguments passed to 'CGGPpred' |
CGGP |
SG object |
theta |
Leave as NULL unless you want to use a value other than thetaMAP. Much slower. |
outdims |
If multiple outputs fit without PCA and with separate parameters, you can predict just for certain dimensions to speed it up. Will leave other columns in the output, but they will be wrong. |
Value
Predicted mean values
See Also
Other CGGP core functions:
CGGPappend()
,
CGGPcreate()
,
CGGPfit()
Examples
SG <- CGGPcreate(d=3, batchsize=100)
y <- apply(SG$design, 1, function(x){x[1]+x[2]^2+rnorm(1,0,.01)})
SG <- CGGPfit(SG, Y=y)
CGGPpred(SG, matrix(c(.1,.1,.1),1,3))
cbind(CGGPpred(SG, SG$design)$mean, y) # Should be near equal
[Package CGGP version 1.0.4 Index]