tensor_decomp: Implements tensor factorization methods, Tucker and...

View source: R/tensor_decomp.R

tensor_decompR Documentation

Implements tensor factorization methods, Tucker and PARAFAC/canonical polyadic decomp

Description

Tucker: If there is no truncationin one of the modes, then this is the same as the MPCA,mpca. If there is no truncation in all the modes, then this is the same as the HOSVD,hosvd.

Usage

tensor_decomp(matrix, dims, method, xlabs = rownames(matrix),
  ylabs = colnames(matrix)[-1], zlabs = NULL, ranks = A@modes,
  savename = "TEST", plot = F)

Arguments

matrix

matrix that gets coverted to multidimensional array that get converted through as.tensor(arr)

dims

dimensions to fold the input matrix

method

"tucker" or "cp"

plot

plot heamtmaps of eigenvectors

z_labs

labels for the extra dimensions created, rows and colnames are the x and y axis labs

rank

default = 3, number (if CP) or vector of numbers (if tucker) that is <= the ranks of the tensor

Details

Input: Multidimensional array that gets converted to as.tensor Output: Decomposed tensor object


KSheu/ksheu.library1 documentation built on Jan. 28, 2025, 3:26 p.m.