Learn R Programming

lineqGPR (version 0.1.1)

lineqGPSys: Linear Systems of Inequalities for "lineqGP" Models

Description

Build the linear system of inequalities for "lineqGP" models.

Usage

lineqGPSys(
  m = nrow(A),
  constrType = c("boundedness", "monotonicity", "convexity", "linear"),
  l = -Inf,
  u = Inf,
  A = diag(m),
  d = length(m),
  lineqSysType = "twosides",
  constrIdx = seq(length(m)),
  rmInf = TRUE
)

Arguments

m

the number of linear inequality constraints.

constrType

a character string corresponding to the type of the inequality constraint. Options: "boundedness", "monotonicity", "convexity", "linear"

l

the value (or vector) with the lower bound.

u

the value (or vector) with the upper bound.

A

a matrix containing the structure of the linear equations.

d

the value with the input dimension.

lineqSysType

a character string corresponding to the type of the linear system. Options: twosides, oneside (see bounds2lineqSys for more details).

constrIdx

for d > 1, a logical vector with the indices of active constrained dimensions.

rmInf

If TRUE, inactive constraints are removed (e.g. \(-\infty \leq x \leq \infty\)).

Value

A list with the linear system of inequalities: list(A,l,u) (twosides) or list(M,g) (oneside).

Comments

This function could change in future versions for more types of inequality constraints in higher dimensions.

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

bounds2lineqSys

Examples

Run this code
# NOT RUN {
linSys1 <- lineqGPSys(m = 5, constrType = "boundedness", l = 0, u = 1, lineqSysType = "twosides")
linSys1
linSys2 <- lineqGPSys(m = 5, constrType = "boundedness", l = 0, u = 1, lineqSysType = "oneside")
linSys2

# }

Run the code above in your browser using DataLab