Description Usage Arguments Details Value Note References See Also
View source: R/rTensor_Decomp.R
Decomposes nonnegative tensor tnsr into core optionally nonnegative tensor Z and sparse nonnegative factor matrices U[n].
| 1 2 3 4 5 | 
| tnsr | nonnegative tensor with  | 
| ranks | an integer vector of length  | 
| core_nonneg | constrain core tensor  | 
| tol | relative Frobenius norm error tolerance | 
| hosvd | If TRUE, apply High Order SVD to improve initial U and Z | 
| max_iter | maximum number of iterations if error stays above  | 
| max_time | max running time | 
| lambda | 
 | 
| L_min | lower bound for Lipschitz constant for the gradients of residual error l(Z,U) = fnorm(tnsr - ttl(Z, U)) by  | 
| rw | controls the extrapolation weight | 
| bound | upper bound for the elements of  | 
| U0 | initial factor matrices, defaults to nonnegative Gaussian random matrices | 
| Z0 | initial core tensor  | 
| verbose | more output algorithm progress | 
| unfold_tnsr | precalculate  | 
The function uses the alternating proximal gradient method to solve the following optimization problem:
\min 0.5 \|tnsr - Z \times_1 U_1 … \times_K U_K \|_{F^2} + ∑_{n=1}^{K} λ_n \|U_n\|_1 + λ_{K+1} \|Z\|_1, \;\textit{where}\; Z ≥q 0, \, U_i ≥q 0.
If core_nonneg is FALSE, core tensor Z is allowed to have negative
elements and z_{i,j}=max(0,z_{i,j}-λ_{K+1}/L_{K+1}) rule is replaced by z_{i,j}=sign(z_{i,j})max(0,|z_{i,j}|-λ_{K+1}/L_{K+1}).
The method stops if either the relative improvement of the error is below the tolerance tol for 3 consequitive iterations or
both the relative error improvement and relative error (wrt the tnsr norm) are below the tolerance.
Otherwise it stops if the maximal number of iterations or the time limit were reached.
a list:
Unonnegative factor matrices
Znonnegative core tensor
estestimate Z \times_1 U_1 … \times_K U_K
convmethod convergence indicator
residthe Frobenius norm of the residual error l(Z,U) plus regularization penalty (if any)
n_iternumber of iterations
n_redonumber of times Z and U were recalculated to avoid the increase in objective function
diagconvergence info for each iteration
all_residsresidues
all_rel_resid_deltasresidue delta relative to the current residue
all_rel_residsresidue relative to the sqrt(||tnsr||)
The implementation is based on ntds() MATLAB code by Yangyang Xu and Wotao Yin.
Y. Xu, "Alternating proximal gradient method for sparse nonnegative Tucker decomposition", Math. Prog. Comp., 7, 39-70, 2013.
http://www.caam.rice.edu/~optimization/bcu/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.