Description Usage Arguments Details Value Note References See Also Examples
View source: R/rTensor_Decomp.R
This is basically the Tucker decomposition of a K-Tensor, tucker
, with one of the modes uncompressed. If K = 3, then this is also known as the Generalized Low Rank Approximation of Matrices (GLRAM). This implementation assumes that the last mode is the measurement mode and hence uncompressed. This is an iterative algorithm, with two possible stopping conditions: either relative error in Frobenius norm has gotten below tol
, or the max_iter
number of iterations has been reached. For more details on the MPCA of tensors, consult Lu et al. (2008).
1 |
tnsr |
Tensor with K modes |
ranks |
a vector of the compressed modes of the output core Tensor, this has length K-1 |
max_iter |
maximum number of iterations if error stays above |
tol |
relative Frobenius norm error tolerance |
Uses the Alternating Least Squares (ALS) estimation procedure. A progress bar is included to help monitor operations on large tensors.
a list containing the following:
Z_ext
the extended core tensor, with the first K-1 modes given by ranks
U
a list of K-1 orthgonal factor matrices - one for each compressed mode, with the number of columns of the matrices given by ranks
conv
whether or not resid
< tol
by the last iteration
est
estimate of tnsr
after compression
norm_percent
the percent of Frobenius norm explained by the approximation
fnorm_resid
the Frobenius norm of the error fnorm(est-tnsr)
all_resids
vector containing the Frobenius norm of error for all the iterations
The length of ranks
must match tnsr@num_modes-1
.
H. Lu, K. Plataniotis, A. Venetsanopoulos, "Mpca: Multilinear principal component analysis of tensor objects". IEEE Trans. Neural networks, 2008.
1 2 3 4 5 6 7 8 9 |
|
| | 0%
|
|=== | 4%
|
|====== | 8%
|
|======== | 12%
|
|=========== | 16%
|
|============== | 20%
|
|================= | 24%
|
|==================== | 28%
|
|====================== | 32%
|
|========================= | 36%
|
|============================ | 40%
|
|=============================== | 44%
|
|================================== | 48%
|
|==================================== | 52%
|
|======================================= | 56%
|
|========================================== | 60%
|
|============================================= | 64%
|
|================================================ | 68%
|
|================================================== | 72%
|
|===================================================== | 76%
|
|======================================================== | 80%
|
|=========================================================== | 84%
|
|============================================================== | 88%
|
|================================================================ | 92%
|
|=================================================================== | 96%
Warning message:
In ranks > tnsr@modes :
longer object length is not a multiple of shorter object length
[1] FALSE
[1] 3.261827
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.