Learn R Programming

tensorBF (version 1.0.2)

normFiberCentering: Preprocessing: fiber Centering

Description

normFiberCentering center the fibers of the \(o^{th}\) mode of the tensor to zero mean.

Usage

normFiberCentering(Y, o)

Arguments

Y

the tensor data. See function tensorBF for details.

o

the \(o^{th}\) (default: 1) mode of the tensor in which the fibers are to be centered to zero mean.

Value

a list containing the following elements:

data

The data after performing the required centering operation.

pre

The centering values used for preprocessing.

References

Kolda, Tamara G., and Brett W. Bader. "Tensor decompositions and applications." SIAM review 51.3 (2009): 455-500.

Examples

Run this code
# NOT RUN {
#Data generation
K <- 3
X <- matrix(rnorm(20*K),20,K)
W <- matrix(rnorm(30*K),30,K)
U <- matrix(rnorm(3*K),3,K)
Y = 0
for(k in 1:K) Y <- Y + outer(outer(X[,k],W[,k]),U[,k])
 Y <- Y + array(rnorm(20*30*3),dim=c(20,30,3))

#center the fibers in first mode of tensor Y
res <- normFiberCentering(Y=Y,o=1)
dim(res$data) #the centered data
# }

Run the code above in your browser using DataLab