Learn R Programming

lineqGPR (version 0.1.1)

augment.lineqAGP: Augmenting Method for the "lineqAGP" S3 Class

Description

Augmenting method for the "lineqAGP" S3 class.

Usage

# S3 method for lineqAGP
augment(x, ...)

Arguments

x

an object with class lineqGP.

...

further arguments passed to or from other methods.

Value

An expanded "lineqGP" object with the following additional elements.

Phi

a matrix corresponding to the hat basis functions. The basis functions are indexed by rows.

Gamma

the covariance matrix of the Gassian vector \(\boldsymbol{\xi}\).

(Lambda,lb,ub)

the linear system of inequalities.

...

further parameters passed to or from other methods.

Details

Some paramaters of the finite-dimensional GP with linear inequality constraints are computed. Here, \(\boldsymbol{\xi}\) is a centred Gaussian vector with covariance \(\boldsymbol{\Gamma}\), s.t. \(\boldsymbol{\Phi} \boldsymbol{\xi} = \boldsymbol{y}\) (interpolation constraints) and \(\boldsymbol{l} \leq \boldsymbol{\Lambda} \boldsymbol{\xi} \leq \boldsymbol{u}\) (inequality constraints).

References

Lopez-Lopera, A. F., Bachoc, F., Durrande, N., and Roustant, O. (2017), "Finite-dimensional Gaussian approximation with linear inequality constraints". ArXiv e-prints [link]

See Also

create.lineqAGP, predict.lineqAGP, simulate.lineqAGP

Examples

Run this code
# NOT RUN {
# creating the model
d <- 2
fun1 <- function(x) return(4*(x-0.5)^2)
fun2 <- function(x) return(2*x)
targetFun <- function(x) return(fun1(x[, 1]) + fun1(x[, 2])) 
xgrid <- expand.grid(seq(0, 1, 0.01), seq(0, 1, 0.01))
ygrid <- targetFun(xgrid)
xdesign <- rbind(c(0.5, 0), c(0.5, 0.5), c(0.5, 1), c(0, 0.5), c(1, 0.5))
ydesign <- targetFun(xdesign)
model <- create(class = "lineqAGP", x = xdesign, y = ydesign,
                constrType = c("convexity", "monotonicity"))

# updating and expanding the model
model$localParam$m <- rep(50, d)
model$kernParam[[1]]$par <- c(1, 0.2)
model$kernParam[[2]]$par <- c(1, 0.2)
model$nugget <- 1e-9
model$varnoise <- 1e-5
model <- augment(model)
str(model)

# }

Run the code above in your browser using DataLab