powered by
Combined with plotTensor3D function and the result of NTF or NTD, the reconstructed tesor structure can be visullized.
recTensor(S = NULL, A = NULL, idx = 1:3, reverse = FALSE)
Tensor object, which is defined as S4 class of rTensor package.
A list containing three factor matrices.
The direction of mode-n muliplication (Default: 1:3). For example idx=1 is defined. S x_1 A is calculated (x_1 : mode-1 multiplication).
If reverse = TRUE, t(A[[n]]) is multiplicated to S (Default: FALSE).
Tensor-class, NTF, NTD
Tensor-class
NTF
NTD
# NOT RUN { tensordata <- toyModel(model = "CP") out <- NTF(tensordata, rank=3, algorithm="Beta-HALS", num.iter=2) rec <- recTensor(out$S, out$A) # }
Run the code above in your browser using DataLab