normSlabScaling: Preprocessing: Slab Scaling

Description Usage Arguments Value References Examples

View source: R/normalize.R

Description

normSlabScaling scales the slabs of the o^{th} mode of the tensor to unit variance.

Usage

1
normSlabScaling(Y, o = 2)

Arguments

Y

the tensor data. See function tensorBF for details.

o

the o^{th} (default: 2) mode of the tensor in which the slabs are to be scaled to unit variance.

Value

a list containing the following elements:

data

The data after performing the required scaling operation.

pre

The scale's used for preprocessing.

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#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))

#scale the slabs in second mode of tensor Y
res <- normSlabScaling(Y=Y,o=2)
dim(res$data) #the scaled data

tensorBF documentation built on May 1, 2019, 8:39 p.m.