Learn R Programming

nnTensor (version 1.0.4)

plotTensor3D: Plot function for visualization of tensor data structure

Description

Combined with recTensor function and the result of NTF or NTD, the reconstructed tesor structure can be visullized.

Usage

plotTensor3D(X = NULL)

Arguments

X

Tensor object, which is defined as S4 class of rTensor package.

Examples

Run this code
# NOT RUN {
tensordata <- toyModel(model = "CP")

out <- NTF(tensordata, rank=3, algorithm="Beta-HALS", num.iter=2)

tmp <- tempdir()

png(filename=paste0(tmp, "/NTF.png"))
plotTensor3D(recTensor(out$S, out$A))
dev.off()
# }

Run the code above in your browser using DataLab