gp.predict {GPBayes} | R Documentation |
Prediction at new inputs based on a Gaussian stochastic process model
Description
This function provides the capability to make prediction based on a GaSP when different estimation methods are employed.
Usage
gp.predict(obj, input.new, method = "Bayes")
Arguments
obj |
an |
input.new |
a matrix of new input lomessageions |
method |
a string indicating the parameter estimation method:
|
Value
a list of predictive mean, predictive standard deviation, 95% predictive intervals
Author(s)
Pulong Ma mpulong@gmail.com
See Also
GPBayes-package, GaSP
, gp, gp.mcmc
, gp.optim
Examples
code = function(x){
y = (sin(pi*x/5) + 0.2*cos(4*pi*x/5))*(x<=9.6) + (x/10-1)*(x>9.6)
return(y)
}
n=100
input = seq(0, 20, length=n)
XX = seq(0, 20, length=99)
Ztrue = code(input)
set.seed(1234)
output = Ztrue + rnorm(length(Ztrue), sd=0.1)
obj = gp(formula=~1, output, input,
param=list(range=4, nugget=0.1,nu=2.5),
smooth.est=FALSE,
cov.model=list(family="matern", form="isotropic"))
fit.optim = gp.optim(obj, method="MMLE")
obj = fit.optim$obj
pred = gp.predict(obj, input.new=XX, method="MMLE")