gp | R Documentation |
S4
object gpThis function constructs the S4
object gp that is used for Gaussian process
model fitting and prediction.
gp(
formula = ~1,
output,
input,
param,
smooth.est = FALSE,
cov.model = list(family = "CH", form = "isotropic"),
dtype = "Euclidean"
)
formula |
an object of |
output |
a numerical vector including observations or outputs in a GaSP |
input |
a matrix including inputs in a GaSP |
param |
a list including values for regression parameters, covariance parameters, and nugget variance parameter. The specification of param should depend on the covariance model.
|
smooth.est |
a logical value indicating whether smoothness parameter will be estimated. |
cov.model |
a list of two strings: family, form, where family indicates the family of covariance functions including the Confluent Hypergeometric class, the Matérn class, the Cauchy class, the powered-exponential class. form indicates the specific form of covariance structures including the isotropic form, tensor form, automatic relevance determination form.
|
dtype |
a string indicating the type of distance:
|
an S4
object of gp class
Pulong Ma mpulong@gmail.com
GPBayes-package, GaSP
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.