hosvd: (Truncated-)Higher-order SVD

Description Usage Arguments Details Value Note References See Also Examples

View source: R/rTensor_Decomp.R

Description

Higher-order SVD of a K-Tensor. Write the K-Tensor as a (m-mode) product of a core Tensor (possibly smaller modes) and K orthogonal factor matrices. Truncations can be specified via ranks (making them smaller than the original modes of the K-Tensor will result in a truncation). For the mathematical details on HOSVD, consult Lathauwer et. al. (2000).

Usage

1
hosvd(tnsr, ranks = NULL)

Arguments

tnsr

Tensor with K modes

ranks

a vector of desired modes in the output core tensor, default is tnsr@modes

Details

Uses the Alternating Least Squares (ALS) estimation procedure. A progress bar is included to help monitor operations on large tensors.

Value

a list containing the following:

Z

core tensor with modes speficied by ranks

U

a list of orthogonal matrices, one for each mode

est

estimate of tnsr after compression

fnorm_resid

the Frobenius norm of the error fnorm(est-tnsr) - if there was no truncation, then this is O(mach_eps)

Note

The length of ranks must match tnsr@num_modes.

References

L. Lathauwer, B.Moor, J. Vanderwalle "A multilinear singular value decomposition". Journal of Matrix Analysis and Applications 2000.

See Also

tucker

Examples

1
2
3
4
5
tnsr <- rand_tensor(c(6,7,8))
hosvdD <-hosvd(tnsr)
hosvdD$fnorm_resid
hosvdD2 <-hosvd(tnsr,ranks=c(3,3,4))
hosvdD2$fnorm_resid

jamesyili/rTensor documentation built on May 18, 2019, 11:22 a.m.