Learn R Programming

GADGET (version 0.2.0)

gp_fit: Fit a Gaussian Process Model

Description

This function fits a Gaussian process (GP) model to a set of possible designs and their corresponding design criterion evaluations. This GP will then be used to optimize the design criterion using an expected improvement criterion.

Usage

gp_fit(
  design,
  response,
  options = list(formula = ~1, kernel = "matern5_2", optimizer = "gen", nuggetUse =
    TRUE)
)

Arguments

design

A matrix of n rows and d columns.

response

A column vector of length n.

options

A list specifying the type of GP model to fit (see km).

Value

A list of properties from class km (see km-class).

Examples

Run this code
# NOT RUN {
x  <- matrix(seq(-1,1,0.3),ncol=1)
y  <- x^2 
gp <- gp_fit(x,
             y,
             options=list(formula=~1, 
             kernel = "matern5_2", 
             optimizer = "gen", 
             nuggetUse = FALSE))
gp_plot(gp$km.model,seq(-1.5,1.5,0.1))
  
# }

Run the code above in your browser using DataLab