projections {lspls}R Documentation

Projection and Orthogonalisation

Description

Functions to project one matrix onto another, or to ortghogonalise it against the other.

Usage

project(M, N)
orth(M, N)
Corth(M, N)

Arguments

M

matrix to be projected or orthogonalised

N

matrix to be projected onto or orthogonalised against

Details

project(M, N) calculates the projection of M onto N, i.e., N (N^t N)^{-1} N^t M.

orth(M, N) orthogonalises M with respect to N, i.e., it calculates the projection of M onto the orthogonal space of N: M - N (N^t N)^{-1} N^t M.

Corth(M, N) calculates the coefficient matrix needed to orthogonalise future matrices, that is, (N^t N)^{-1} N^t M. Future matrices m and n can be orthogonalised with m - n %*% Corth(M, N).

Value

A matrix.

Note

The functions need to be opitmised, both for speed and numerical accurracy.

Author(s)

Bjørn-Helge Mevik

See Also

lspls, lsplsCv, predict.lspls

Examples

##FIXME

[Package lspls version 0.2-2 Index]