Learn R Programming

⚠️There's a newer version (1.4.8) of this package.Take me there.

rTensor (version 1.4.1)

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 Hamadard product for a list of matrices.

Copy Link

Version

Install

install.packages('rTensor')

Monthly Downloads

1,022

Version

1.4.1

License

GPL (>= 2)

Maintainer

James Li

Last Published

March 22nd, 2020

Functions in rTensor (1.4.1)

Ops-methods

Conformable elementwise operators for Tensor
cs_unfold-methods

Tensor Column Space Unfolding
cs_fold

Column Space Folding of Matrix
fnorm-methods

Tensor Frobenius Norm
as.tensor

Tensor Conversion
cp

Canonical Polyadic Decomposition
head-methods

Head for Tensor
Tensor-class

S4 Class for a Tensor
k_unfold-methods

Tensor k-mode Unfolding
kronecker_list

List Kronecker Product
initialize-methods

Initializes a Tensor instance
pvd

Population Value Decomposition
k_fold

k-mode Folding of Matrix
innerProd-methods

Tensors Inner Product
print-methods

Print for Tensor
matvec-methods

Tensor Matvec Unfolding
t_mult

Tensor Multiplication (T-MULT)
t_svd

Tensor Singular Value Decomposition
fold

General Folding of Matrix
hosvd

(Truncated-)Higher-order SVD
mpca

Multilinear Principal Components Analysis
khatri_rao

Khatri-Rao Product
[-methods

Extract or Replace Subtensors
dim-methods

Mode Getter for Tensor
khatri_rao_list

List Khatri-Rao Product
t-methods

Tensor Transpose
plot_orl

Function to plot the ORL Database of Faces
show-methods

Show for Tensor
modeMean-methods

Tensor Mean Across Single Mode
modeSum-methods

Tensor Sum Across Single Mode
rs_fold

Row Space Folding of Matrix
tperm-methods

Mode Permutation for Tensor
hadamard_list

List hadamard Product
rTensor-package

Tools for tensor analysis and decomposition
ttl

Tensor Times List
rs_unfold-methods

Tensor Row Space Unfolding
vec-methods

Tensor Vec
ttm

Tensor Times Matrix (m-Mode Product)
t_svd_reconstruct

Reconstruct Tensor From TSVD
rand_tensor

Tensor with Random Entries
tail-methods

Tail for Tensor
tucker

Tucker Decomposition
unfold-methods

Tensor Unfolding
unmatvec

Unmatvec Folding of Matrix
faces_tnsr

ORL Database of Faces