Learn R Programming

rTensor (version 1.4.8)

Tools for Tensor Analysis and Decomposition

Description

A set of tools for creation, manipulation, and modeling of tensors with arbitrary number of modes. A tensor in the context of data analysis is a multidimensional array. rTensor does this by providing a S4 class 'Tensor' that wraps around the base 'array' class. rTensor provides common tensor operations as methods, including matrix unfolding, summing/averaging across modes, calculating the Frobenius norm, and taking the inner product between two tensors. Familiar array operations are overloaded, such as index subsetting via '[' and element-wise operations. rTensor also implements various tensor decomposition, including CP, GLRAM, MPCA, PVD, and Tucker. For tensors with 3 modes, rTensor also implements transpose, t-product, and t-SVD, as defined in Kilmer et al. (2013). Some auxiliary functions include the Khatri-Rao product, Kronecker product, and the Hadamard product for a list of matrices.

Copy Link

Version

Install

install.packages('rTensor')

Monthly Downloads

912

Version

1.4.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 15th, 2021

Functions in rTensor (1.4.8)

hadamard_list

List hadamard Product
head-methods

Head for Tensor
rs_unfold-methods

Tensor Row Space Unfolding
rs_fold

Row Space Folding of Matrix
cs_unfold-methods

Tensor Column Space Unfolding
cs_fold

Column Space Folding of Matrix
[-methods

Extract or Replace Subtensors
ttm

Tensor Times Matrix (m-Mode Product)
initialize-methods

Initializes a Tensor instance
hosvd

(Truncated-)Higher-order SVD
modeMean-methods

Tensor Mean Across Single Mode
k_unfold-methods

Tensor k-mode Unfolding
Ops-methods

Conformable elementwise operators for Tensor
tucker

Tucker Decomposition
khatri_rao

Khatri-Rao Product
matvec-methods

Tensor Matvec Unfolding
modeSum-methods

Tensor Sum Across Single Mode
load_orl

ORL Database of Faces
tperm-methods

Mode Permutation for Tensor
ttl

Tensor Times List
t_svd_reconstruct

Reconstruct Tensor From TSVD
tail-methods

Tail for Tensor
fnorm-methods

Tensor Frobenius Norm
vec-methods

Tensor Vec
as.tensor

Tensor Conversion
print-methods

Print for Tensor
cp

Canonical Polyadic Decomposition
Tensor-class

S4 Class for a Tensor
khatri_rao_list

List Khatri-Rao Product
kronecker_list

List Kronecker Product
fold

General Folding of Matrix
rand_tensor

Tensor with Random Entries
rTensor-package

Tools for tensor analysis and decomposition
show-methods

Show for Tensor
pvd

Population Value Decomposition
innerProd-methods

Tensors Inner Product
mpca

Multilinear Principal Components Analysis
k_fold

k-mode Folding of Matrix
t_mult

Tensor Multiplication (T-MULT)
t_svd

Tensor Singular Value Decomposition
t-methods

Tensor Transpose
unfold-methods

Tensor Unfolding
unmatvec

Unmatvec Folding of Matrix
plot_orl

Function to plot the ORL Database of Faces
dim-methods

Mode Getter for Tensor