plotTensor2D: Plot function for visualization of matrix data structure

View source: R/plotTensor2D.R

plotTensor2DR Documentation

Plot function for visualization of matrix data structure

Description

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

Usage

plotTensor2D(X = NULL, method=c("sd", "mad"),
    sign=c("positive", "negative", "both"), thr=2)

Arguments

X

Matrix object.

method

Cutoff method to focus on large/small value in the tensor data (Default: "sd").

sign

Direction to cutoff the large/small value in the tensor data (Default: "positive").

thr

Threshold of cutoff method (Default: 2).

Author(s)

Koki Tsuyuzaki

Examples

tensordata <- toyModel(model = "CP")

out <- NTF(tensordata, rank=3, num.iter=2)

tmp <- tempdir()

png(filename=paste0(tmp, "/NTF.png"))
plotTensor2D(out$A[[1]])
dev.off()

nnTensor documentation built on June 22, 2024, 6:52 p.m.