ortProj: Orthogonal projection on Ran(A)

View source: R/mappings.R

ortProjR Documentation

Orthogonal projection on Ran(A)

Description

Orthogonal projection on the subspace spanned by A

Usage

ortProj(x, pA)

Arguments

x

matrix of high-dimensional coordinates, one point per row

pA

matrix giving the coordinates of the orthogonal projection onto Ran(A)

Details

It is assumed that rows of pA are orthonormal, such that this linear transformation gives the coordinates on Ran(A) with an orthonormal basis

Value

z matrix of coordinates of the orthogonal projection onto Ran(A)

Author(s)

Mickael Binois

Examples

## Example of orthogonal projection
d <- 2; D <- 6
A1 <- selectA(d, D, type = 'Gaussian')
A2 <- selectA(d, D, type = 'isotropic')
A3 <- selectA(d, D, type = 'optimized')

n <- 10000
size <- 10
Y <- size * (2 * matrix(runif(n * d), n) - 1)

Z1 <- ortProj(randEmb(Y, A1), t(A1))
Z2 <- ortProj(randEmb(Y, A2), t(A2))
Z3 <- ortProj(randEmb(Y, A3), t(A3))

par(mfrow = c(1, 3))
plot(Z1, asp = 1)
plot(Z2, asp = 1)
plot(Z3, asp = 1)

par(mfrow = c(1, 1))

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