Title: | MultiLinear Algebra |
---|---|
Description: | A set of tools for basic tensor operators. A tensor in the context of data analysis in a multidimensional array. The tools in this package rely on using any discrete transformation (e.g. Fast Fourier Transform (FFT)). Standard tools included are the Eigenvalue decomposition of a tensor, the QR decomposition and LU decomposition. Other functionality includes the inverse of a tensor and the transpose of a symmetric tensor. Functionality in the package is outlined in Kernfeld et al. (2015) <https://www.sciencedirect.com/science/article/pii/S0024379515004358>. |
Authors: | Kyle Caudle [aut, cre], Randy Hoover [ctb], Jackson Cates [ctb] |
Maintainer: | Kyle Caudle <[email protected]> |
License: | GPL-3 |
Version: | 2.0.0 |
Built: | 2025-02-09 06:01:17 UTC |
Source: | https://github.com/cran/rTensor2 |
Create a Tensor-class object from an array, matrix, or vector.
as.tensor(x, drop = FALSE)
as.tensor(x, drop = FALSE)
x |
: an instance of array, matrix, or vector |
drop |
: whether or not modes equal to 1 should be dropped |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
Imported from rTensor package version 1.4.8.
#From vector vec <- runif(3); vecT <- as.tensor(vec); vecT #From matrix mat <- matrix(runif(2*3),nrow=2,ncol=3) matT <- as.tensor(mat); matT #From array indices <- c(2,3,4) arr <- array(runif(prod(indices)), dim = indices) arrT <- as.tensor(arr); arrT
#From vector vec <- runif(3); vecT <- as.tensor(vec); vecT #From matrix mat <- matrix(runif(2*3),nrow=2,ncol=3) matT <- as.tensor(mat); matT #From array indices <- c(2,3,4) arr <- array(runif(prod(indices)), dim = indices) arrT <- as.tensor(arr); arrT
Decompose a square matrix A into the product of a lower triangular matrix L and an upper triangular matrix U.
LU(A)
LU(A)
A |
: an |
a lower triangular matrix L and an upper triangular matrix U so that A = LU.
Kyle Caudle
Randy Hoover
Jackson Cates
z <- complex(real = rnorm(16), imag = rnorm(16)) A <- matrix(z,nrow=4) LU(A)
z <- complex(real = rnorm(16), imag = rnorm(16)) A <- matrix(z,nrow=4) LU(A)
10000 MNIST training images (1000 of every digit), reformatted into a tensor: 28 x 10000 x 28. 1000 MNIST test images (100 of every digit), reformatted into a tensor: 28 x 1000 x 28
data("Mnist")
data("Mnist")
The format is:
Mnist$train$images, Mnist$train$labels
Mnist$test$images, Mnist$test$labels
Deng L (2012). “The mnist database of handwritten digit images for machine learning research.” IEEE Signal Processing Magazine, 29(6), 141–142
data(tensor)
data(tensor)
Creates the polar/Jordan form of the P and D matrices after performing eigenvalue decomposition where the eigenvalue values are complex.
polar(P,D)
polar(P,D)
P |
: the eigenvectors from an eigenvalue decomposition. |
D |
: the eigenvalues from an eigenvalue decomposition. |
P the polar form (real-valued) matrix of eigenvectors.
D the polar form (real-valued) matrix of eigenvalues.
Kyle Caudle
Randy Hoover
Jackson Cates
z <- complex(real = rnorm(16), imag = rnorm(16)) M <- matrix(z,nrow=4) decomp <- eigen(M) polar(decomp$vectors,decomp$values)
z <- complex(real = rnorm(16), imag = rnorm(16)) M <- matrix(z,nrow=4) decomp <- eigen(M) polar(decomp$vectors,decomp$values)
Performs QR Decomposition of a Complex Matrix without pivoting.
QR(A)
QR(A)
A |
: an |
an orthogonal matrix Q and an upper triangular matrix R so that A = QR.
Kyle Caudle
Randy Hoover
Jackson Cates
z <- complex(real = rnorm(16), imag = rnorm(16)) A <- matrix(z,nrow=4) QR(A)
z <- complex(real = rnorm(16), imag = rnorm(16)) A <- matrix(z,nrow=4) QR(A)
Generate a Tensor with specified modes with iid normal(0,1) entries.
rand_tensor(modes = c(3, 4, 5), drop = FALSE)
rand_tensor(modes = c(3, 4, 5), drop = FALSE)
modes |
: the modes of the output Tensor |
drop |
: whether or not modes equal to 1 should be dropped |
a Tensor object with modes given by modes
Kyle Caudle
Randy Hoover
Jackson Cates
Imported from rTensor package version 1.4.8.
rand_tensor() rand_tensor(c(4,4,4)) rand_tensor(c(10,2,1),TRUE)
rand_tensor() rand_tensor(c(4,4,4)) rand_tensor(c(10,2,1),TRUE)
4 tensors (128 x 128 x 128) for 4 different gray scale images. boat, flashlight, keyboard, scooter.
data("raytrace")
data("raytrace")
The format is:
raytrace$boat
raytrace$flashlight
raytrace$keyboard
raytrace$scooter
Hoover RC, Braman KS, Hao N (2011b). “Pose estimation from a single image using tensor decomposition and an algebra of circulants.” In 2011 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 2928–2934. IEEE.
data(raytrace)
data(raytrace)
Performs the transpose of a symmetric 3-mode tensor using any discrete transform.
t_tpose(tnsr,tform)
t_tpose(tnsr,tform)
tnsr |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(t_tpose(T,"dct"))
T <- rand_tensor(modes=c(2,3,4)) print(t_tpose(T,"dct"))
Performs the Discrete Wavelet Transform of a 3-D Tensor.
tDWT(tnsr)
tDWT(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
G. Strang and T. Nguyen, Wavelets and filter banks. SIAM, 1996.
A. Haar, "Zur theorie der orthogonalen funktionensysteme", Mathematische annalen, vol. 69, no. 3, pp. 331-371, 1910.
T <- rand_tensor(modes=c(2,3,4)) print(tDWT(T))
T <- rand_tensor(modes=c(2,3,4)) print(tDWT(T))
Performs a Eigenvalue decomposition of 3-mode tensor using any discrete transform.
tEIG(tnsr, tform)
tEIG(tnsr, tform)
tnsr |
: a 3-mode tensor, |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
Kernfeld, E., Kilmer, M., & Aeron, S. (2015). Tensor-tensor products with invertible linear transforms. Linear Algebra and its Applications, 485, 545-570.
M. E. Kilmer, C. D. Martin, and L. Perrone, “A third-order generalization of the matrix svd as a product of third-order tensors,” Tufts University, Department of Computer Science, Tech. Rep. TR-2008-4, 2008
K. Braman, "Third-order tensors as linear operators on a space of matrices", Linear Algebra and its Applications, vol. 433, no. 7, pp. 1241-1253, 2010.
T <- rand_tensor(modes=c(2,2,4)) tEIG(T,"dst")
T <- rand_tensor(modes=c(2,2,4)) tEIG(T,"dst")
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Cosine transform.
tEIGdct(tnsr)
tEIGdct(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdct(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdct(T))
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Hadley transform.
tEIGdht(tnsr)
tEIGdht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdht(T))
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Sine transform.
tEIGdst(tnsr)
tEIGdst(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdst(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdst(T))
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Walsh-Hadamard transform.
tEIGdwht(tnsr)
tEIGdwht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdwht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdwht(T))
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Wavelet transform (Haar Wavelet).
tEIGdwt(tnsr)
tEIGdwt(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
G. Strang and T. Nguyen, Wavelets and filter banks. SIAM, 1996.
A. Haar, “Zur theorie der orthogonalen funktionensysteme,” Mathema- tische annalen, vol. 69, no. 3, pp. 331–371, 1910.
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdwt(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGdwt(T))
Performs a Eigenvalue decomposition of 3-mode tensor using the discrete Fourier transform.
tEIGfft(tnsr)
tEIGfft(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If Eigenvalue decomposition is performed on a x
x
tensor, the components in the returned value are:
P: A tensor of Eigenvectors ( x
x
)
D: An diagonal tensor of Eigenvalues ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tEIGfft(T))
T <- rand_tensor(modes=c(2,2,4)) print(tEIGfft(T))
Performs the Discrete Inverse Wavelet Transform of a 3-D Tensor.
tIDWT(tnsr)
tIDWT(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
G. Strang and T. Nguyen, Wavelets and filter banks. SIAM, 1996.
A. Haar, "Zur theorie der orthogonalen funktionensysteme", Mathematische annalen, vol. 69, no. 3, pp. 331-371, 1910.
T <- rand_tensor(modes=c(2,3,4)) print(tIDWT(T))
T <- rand_tensor(modes=c(2,3,4)) print(tIDWT(T))
Performs the inverse of a tensor using the any discrete transform.
tINV(tnsr,tform)
tINV(tnsr,tform)
tnsr |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINV(T,"dst"))
T <- rand_tensor(modes=c(2,2,4)) print(tINV(T,"dst"))
Performs the inverse of a tensor using the discrete cosine transform.
tINVdct(tnsr)
tINVdct(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVdct(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVdct(T))
Performs the inverse of a tensor using the discrete Hartley transform.
tINVdht(tnsr)
tINVdht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVdht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVdht(T))
Performs the inverse of a tensor using the discrete sine transform.
tINVdst(tnsr)
tINVdst(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVdst(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVdst(T))
Performs the inverse of a tensor using the discrete Walsh-Hadamard transform.
tINVdwht(tnsr)
tINVdwht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVdwht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVdwht(T))
Performs the inverse of a tensor using the discrete wavelet transform (Haar Wavelet).
tINVdwt(tnsr)
tINVdwt(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVdwt(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVdwt(T))
Performs the inverse of a tensor using the discrete Fourier transform.
tINVfft(tnsr)
tINVfft(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tINVfft(T))
T <- rand_tensor(modes=c(2,2,4)) print(tINVfft(T))
Performs linear discriminate analysis on a tensor using any discrete transform. Assumes tensor is sorted by classes.
tLDA(tnsr,nClass,nSamplesPerClass,tform)
tLDA(tnsr,nClass,nSamplesPerClass,tform)
tnsr |
: a 3-mode tensor |
nClass |
: Number of classes |
nSamplesPerClass |
: Samples in each class |
tform |
: one of six-discrete transforms. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
data("Mnist") T <- Mnist$train$images myorder <- order(Mnist$train$labels) # tLDA need to be sorted by classes T_sorted <- as.tensor(T[,myorder,]) # Using small tensor, 2 images for each class for demonstration T <- T_sorted[,c(1:2,1001:1002,2001:2002,3001:3002, 4001:4002,5001:5002,6001:6002,7001:7002, 8001:8002,9001:9002),] tLDA(T,10,2,"dct")
data("Mnist") T <- Mnist$train$images myorder <- order(Mnist$train$labels) # tLDA need to be sorted by classes T_sorted <- as.tensor(T[,myorder,]) # Using small tensor, 2 images for each class for demonstration T <- T_sorted[,c(1:2,1001:1002,2001:2002,3001:3002, 4001:4002,5001:5002,6001:6002,7001:7002, 8001:8002,9001:9002),] tLDA(T,10,2,"dct")
Performs a tensor LU decomposition on any 3-mode tensor using any discrete transform.
tLU(tnsr,tform)
tLU(tnsr,tform)
tnsr |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
If LU decomposition is performed on a x
x
tensor, the components in the returned value are:
L: The lower triangular tensor object ( x
x
)
U: The upper triangular tensor object ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
Kernfeld, E., Kilmer, M., & Aeron, S. (2015). Tensor-tensor products with invertible linear transforms. Linear Algebra and its Applications, 485, 545-570.
M. E. Kilmer, C. D. Martin, and L. Perrone, “A third-order generalization of the matrix svd as a product of third-order tensors,” Tufts University, Department of Computer Science, Tech. Rep. TR-2008-4, 2008
K. Braman, "Third-order tensors as linear operators on a space of matrices", Linear Algebra and its Applications, vol. 433, no. 7, pp. 1241-1253, 2010.
T <- rand_tensor(modes=c(2,2,4)) tLU(T,"dst")
T <- rand_tensor(modes=c(2,2,4)) tLU(T,"dst")
Performs a LU decomposition of 3-mode tensor using the discrete Cosine transform.
tLUdct(tnsr)
tLUdct(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The lower triangular tensor object ()
U: The upper triangular tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUdct(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUdct(T))
Performs a LU decomposition of 3-mode tensor using the discrete Hartley transform.
tLUdht(tnsr)
tLUdht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The lower triangular tensor object ()
U: The upper triangular tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUdht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUdht(T))
Performs a LU decomposition of 3-mode tensor using the discrete Sine transform.
tLUdst(tnsr)
tLUdst(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The lower triangular tensor object ()
U: The upper triangular tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUdst(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUdst(T))
Performs a LU decomposition of 3-mode tensor using the discrete Walsh-Hadamard transform.
tLUdwht(tnsr)
tLUdwht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The lower triangular tensor object ()
U: The upper triangular tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUdwht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUdwht(T))
Performs a LU decomposition of 3-mode tensor using the discrete Wavelet transform (Haar Wavelet).
tLUdwt(tnsr)
tLUdwt(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The left singular value tensor object ()
U: The right singular value tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUdwt(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUdwt(T))
Performs a LU decomposition of 3-mode tensor using the discrete Fourier transform.
tLUfft(tnsr)
tLUfft(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If LU decomposition is performed on a tensor, the components in the returned value are:
L: The lower triangular tensor object ()
U: The upper triangular tensor object ()
Kyle Caudle [email protected]
T <- rand_tensor(modes=c(2,2,4)) print(tLUfft(T))
T <- rand_tensor(modes=c(2,2,4)) print(tLUfft(T))
Find the mean of a 3-mode tensor.
tmean(tnsr)
tmean(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
tnsr <- rand_tensor(modes=c(3,4,5)) tmean(tnsr)
tnsr <- rand_tensor(modes=c(3,4,5)) tmean(tnsr)
Multiplies two 3-mode tensors using any discrete transform.
tmult(x,y,tform)
tmult(x,y,tform)
x |
: a 3-mode tensor |
y |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
Kyle Caudle
Randy Hoover
Jackson Cates
T1 <- rand_tensor(modes=c(2,2,4)) T2 <- rand_tensor(modes=c(2,3,4)) print(tmult(T1,T2,"dst"))
T1 <- rand_tensor(modes=c(2,2,4)) T2 <- rand_tensor(modes=c(2,3,4)) print(tmult(T1,T2,"dst"))
Performs a tensor QR decomposition on any 3-mode tensor using any discrete transform.
tQR(tnsr,tform)
tQR(tnsr,tform)
tnsr |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
If the QR decomposition is performed on a tensor, the components in the returned value are:
Q: The left singular value tensor object ()
R: The right singular value tensor object ()
Kyle Caudle [email protected]
Kernfeld, E., Kilmer, M., & Aeron, S. (2015). Tensor-tensor products with invertible linear transforms. Linear Algebra and its Applications, 485, 545-570.
M. E. Kilmer, C. D. Martin, and L. Perrone, “A third-order generalization of the matrix svd as a product of third-order tensors,” Tufts University, Department of Computer Science, Tech. Rep. TR-2008-4, 2008
K. Braman, "Third-order tensors as linear operators on a space of matrices", Linear Algebra and its Applications, vol. 433, no. 7, pp. 1241-1253, 2010.
T <- rand_tensor(modes=c(2,2,4)) tQR(T,"dst")
T <- rand_tensor(modes=c(2,2,4)) tQR(T,"dst")
Performs a QR decomposition of 3-mode tensor using the discrete Cosine transform.
tQRdct(tnsr)
tQRdct(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQR(T,"dct"))
T <- rand_tensor(modes=c(2,2,4)) print(tQR(T,"dct"))
Performs a QR decomposition of 3-mode tensor using the discrete Hartley transform.
tQRdht(tnsr)
tQRdht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQRdht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tQRdht(T))
Performs a QR decomposition of 3-mode tensor using the discrete Sine transform.
tQRdst(tnsr)
tQRdst(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQRdst(T))
T <- rand_tensor(modes=c(2,2,4)) print(tQRdst(T))
Performs a QR decomposition of 3-mode tensor using the discrete Walsh-Hadamard transform.
tQRdwht(tnsr)
tQRdwht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQRdwht(T))
T <- rand_tensor(modes=c(2,2,4)) print(tQRdwht(T))
Performs a QR decomposition of 3-mode tensor using the discrete wavelet transform.
tQRdwt(tnsr)
tQRdwt(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQRdwt(T))
T <- rand_tensor(modes=c(2,2,4)) print(tQRdwt(T))
Performs a QR decomposition of 3-mode tensor using the discrete Fourier transform.
tQRfft(tnsr)
tQRfft(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If QR decomposition is performed on a x
x
tensor, the components in the returned value are:
Q: An orthogonal tensor ( x
x
).
R: An upper triangular tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,2,4)) print(tQRfft(T))
T <- rand_tensor(modes=c(2,2,4)) print(tQRfft(T))
Performs a tensor singular value decomposition on any 3-mode tensor using any discrete transform.
tSVD(tnsr,tform)
tSVD(tnsr,tform)
tnsr |
: a 3-mode tensor |
tform |
: Any discrete transform. Supported transforms are: fft: Fast Fourier Transform dwt: Discrete Wavelet Transform (Haar Wavelet) dct: Discrete Cosine transform dst: Discrete Sine transform dht: Discrete Hadley transform dwht: Discrete Walsh-Hadamard transform |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
Kernfeld, E., Kilmer, M., & Aeron, S. (2015). Tensor-tensor products with invertible linear transforms. Linear Algebra and its Applications, 485, 545-570.
M. E. Kilmer, C. D. Martin, and L. Perrone, “A third-order generalization of the matrix svd as a product of third-order tensors,” Tufts University, Department of Computer Science, Tech. Rep. TR-2008-4, 2008
K. Braman, "Third-order tensors as linear operators on a space of matrices", Linear Algebra and its Applications, vol. 433, no. 7, pp. 1241-1253, 2010.
T <- rand_tensor(modes=c(2,3,4)) print(tSVD(T,"dst"))
T <- rand_tensor(modes=c(2,3,4)) print(tSVD(T,"dst"))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete cosine transform.
tSVDdct(tnsr)
tSVDdct(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdct(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdct(T))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete Harley transform.
tSVDdht(tnsr)
tSVDdht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdht(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdht(T))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete Sine transform.
tSVDdst(tnsr)
tSVDdst(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdst(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdst(T))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete Walsh-Hadamard transform.
tSVDdwht(tnsr)
tSVDdwht(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdwht(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdwht(T))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete wavelet transform (Haar Wavelet).
tSVDdwt(tnsr)
tSVDdwt(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdwt(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDdwt(T))
Performs a tensor singular value decomposition on any 3-mode tensor using the discrete Fourier transform.
tSVDfft(tnsr)
tSVDfft(tnsr)
tnsr |
: a 3-mode tensor |
a Tensor-class object
If the SVD is performed on a x
x
tensor, the components in the returned value are:
U: The left singular value tensor object ( x
x
)
V: The right singular value tensor object ( x
x
)
S: A diagonal tensor ( x
x
)
Kyle Caudle
Randy Hoover
Jackson Cates
T <- rand_tensor(modes=c(2,3,4)) print(tSVDfft(T))
T <- rand_tensor(modes=c(2,3,4)) print(tSVDfft(T))