Learn R Programming

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

rTensor (version 1.4)

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

License

GPL (>= 2)

Maintainer

James Li

Last Published

December 4th, 2018

Functions in rTensor (1.4)

k_fold

k-mode Folding of Matrix
k_unfold-methods

Tensor k-mode Unfolding
modeMean-methods

Tensor Mean Across Single Mode
cp

Canonical Polyadic Decomposition
fold

General Folding of Matrix
modeSum-methods

Tensor Sum Across Single Mode
rs_fold

Row Space Folding of Matrix
hadamard_list

List hadamard Product
rs_unfold-methods

Tensor Row Space Unfolding
print-methods

Print for Tensor
faces_tnsr

ORL Database of Faces
fnorm-methods

Tensor Frobenius Norm
head-methods

Head for Tensor
hosvd

(Truncated-)Higher-order SVD
unfold-methods

Tensor Unfolding
unmatvec

Unmatvec Folding of Matrix
pvd

Population Value Decomposition
cs_fold

Column Space Folding of Matrix
Ops-methods

Conformable elementwise operators for Tensor
Tensor-class

S4 Class for a Tensor
t_mult

Tensor Multiplication (T-MULT)
rTensor-package

Tools for tensor analysis and decomposition
cs_unfold-methods

Tensor Column Space Unfolding
khatri_rao

Khatri-Rao Product
rand_tensor

Tensor with Random Entries
khatri_rao_list

List Khatri-Rao Product
mpca

Multilinear Principal Components Analysis
plot_orl

Function to plot the ORL Database of Faces
show-methods

Show for Tensor
initialize-methods

Initializes a Tensor instance
t_svd

Tensor Singular Value Decomposition
innerProd-methods

Tensors Inner Product
vec-methods

Tensor Vec
t_svd_reconstruct

Reconstruct Tensor From TSVD
tail-methods

Tail for Tensor
t-methods

Tensor Transpose
ttm

Tensor Times Matrix (m-Mode Product)
kronecker_list

List Kronecker Product
matvec-methods

Tensor Matvec Unfolding
tucker

Tucker Decomposition
tperm-methods

Mode Permutation for Tensor
ttl

Tensor Times List
dim-methods

Mode Getter for Tensor
[-methods

Extract or Replace Subtensors
as.tensor

Tensor Conversion