Psi_Z: Warping psi for points in the zonotope Z

View source: R/warpings.R

Psi_ZR Documentation

Warping psi for points in the zonotope Z

Description

Warping psi for the alternative mapping procedure

Usage

Psi_Z(z, A, eps = 1e-06, Amat = NULL, Aind = NULL)

Arguments

z

matrix of low dimensional coordinates, one point per row. These points must belong to Z, that can be checked by testZ

A

random embedding matrix

eps

to avoid some numerical issues with quadratic programming

Aind, Amat

optional matrices to be passed to solve.QP.compact

References

M. Binois, D. Ginsbourger, O. Roustant (2018), On the choice of the low-dimensional domain for global optimization via random embeddings, arXiv:1704.05318

Examples

# Comparison with between results starting from Y and from Z
set.seed(42)
d <- 2; D <- 5

A <- selectA(d, D, type = 'optimized')
sizeY <- 5 # box size of Y
sizeZ <- sqrt(D) # box size of Z
ntest <- 10000
Y <- sizeY * (2 * matrix(runif(ntest * d), ntest, d) - 1)
X <- randEmb(Y, A)
Z <- ortProj(X, t(A))

PsisY <- Psi_Y(Y, A)
ind <- testZ(Z, t(A), eps = 1e-8) ## Should be all TRUE, up to numerical error
PsisZ <- Psi_Z(Z[ind,], A)
plot(PsisY)
points(PsisZ, col = 'red', pch = 20)
print(max(abs(PsisY - PsisZ)))

mbinois/RRembo documentation built on Sept. 16, 2023, 10:15 p.m.