Projects the columns of the matrix M
on the space spanned by the
columns of the matrix X
, with respect to the inner product
defined by weight
: <x|y>=sum(x*w*y)
.
projection.ip(X, M, orth = FALSE, weight = rep(1, nrow(X)))
Matrix defining the space to project onto.
Matrix of columns to be projected. Must have the same number
of rows as X
.
Should the projection be on the orthogonal complement to
span(X)
?
Weights defining the inner product. Numerical vector of
length nrow(X)
.
A matrix of full rank with columns in span(X)