Learn R Programming

PTAk (version 2.0.0)

PROJOT: Orthogonal Tensor projection

Description

Orthogonal-tensoriel projection of a tensor according to a rank-1 tensor, or a to bigger structure defined by kronecker product of matrices.

Usage

PROJOT(X,solu,numo=1,bortho=TRUE,Ortho=TRUE,metrics=NULL)

Value

A tensor with dimensions as X

Arguments

X

a tensor(as an array) of any order

solu

an object like a solutions.PTAk object with at least v

numo

a vector of numbers or a list of vectors (length the order of the tensor) identifying for each space the structure to project onto, if NULL for a specific space then no projection is done for this space

bortho

list of logicals saying if the structures are othogonal or not.

Ortho

list of logicals telling the projectors on each space to be on the structure or on its orthogonal.

metrics

NULL or list of metrics (either diagonal or not) for each entry of X

Author

Didier G. Leibovici GeotRycs@gmail.com

Details

This function computes the tensorial orthogonal projection of X onto the tensorial structure defined by solu and numo. For each space (involved in the tensorial product where from X belongs), one defined the projector onto solu[[i]]$v[numo,] (or on its orthogonal if Ortho[[i]]==TRUE), then the result is the image of X by the tensorial product of the projectors, i.e. $$(P_{S1} \otimes P_{S2} \otimes \ldots \otimes P_{Sk})(X)$$.

References

Leibovici D(1993) Facteurs <e0> Mesures R<e9>p<e9>t<e9>es et Analyses Factorielles : applications <e0> un suivi <e9>pid<e9>miologique. Universit<e9> de Montpellier II. PhD Thesis in Math<e9>matiques et Applications (Biostatistiques).

Leibovici D (2000) Multiway Multidimensional Analysis for Pharmaco-EEG Studies. http://www.fmrib.ox.ac.uk/analysis/techrep/tr00dl2/tr00dl2.pdf

See Also

PTAk

Examples

Run this code

don <- array(1:360,c(5,4,6,3))
 don <- don + rnorm(360,10,2)

 ones <- list(list(v=rep(1,5)),list(v=rep(1,4)),list(v=rep(1,6)),list(v=rep(1,3)))
 donfc <- PROJOT(don,ones)

 apply(donfc,c(2,3,4),mean)
 apply(donfc,c(1),mean)

  # implementation de PTAIVk with obvious settings
 PTAIVk <- function(X,STruct,...)
         {X <- PROJOT(X$data,STruct,numo=Struct[[1]]$numo,Ortho=Struct[[1]]$Ortho,metrics=X$met)
         PTAk(X,...)
         }

   

Run the code above in your browser using DataLab