Psi_Z | R Documentation |
Warping psi for the alternative mapping procedure
Psi_Z(z, A, eps = 1e-06, Amat = NULL, Aind = NULL)
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 |
M. Binois, D. Ginsbourger, O. Roustant (2018), On the choice of the low-dimensional domain for global optimization via random embeddings, arXiv:1704.05318
# 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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.