Description Usage Arguments Value Author(s) References See Also Examples
Creation method for the "lineqAGP"
S3 class.
1 2 | ## S3 method for class 'lineqAGP'
create(x, y, constrType)
|
x |
a vector or matrix with the input data. The dimensions should be indexed by columns. |
y |
a vector with the output data. |
constrType |
a character string corresponding to the type of the inequality constraint.
Options: "boundedness", "monotonicity", "convexity", "linear";
Multiple constraints can be also defined, e.g. |
A list with the following elements.
x,y,constrType |
see Arguments. |
d |
a number corresponding to the input dimension. |
constrIdx |
for d > 1, a integer vector with the indices of active constrained dimensions. |
constrParam |
constraint inequalities for each dimension. |
varnoise |
a scalar with noise variance. |
localParam |
a list with specific parameters required for |
kernParam |
a list with the kernel parameters: |
bounds |
the limit values if |
(Lambda,lb,ub) |
the linear system of inequalities if |
A. F. Lopez-Lopera.
Lopez-Lopera, A. F., Bachoc, F., Durrande, N., and Roustant, O. (2017), "Finite-dimensional Gaussian approximation with linear inequality constraints". ArXiv e-prints [link]
augment.lineqAGP
, predict.lineqAGP
, simulate.lineqAGP
1 2 3 4 5 6 7 8 9 10 11 12 | # 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"))
str(model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.