tpca.RdTensor analogue of PCA introduced by Mor et al. (2022) based on Kilmer's m-product algebra and tsvdm.
tpca(
x,
ncomp = NULL,
m = NULL,
minv = NULL,
center = TRUE,
matrix_output = TRUE,
bpparam = NULL
)Tensor input.
The estimated number of components. ncomp can be explicitly set using an integer value, 0 < float value < 1, or left as NULL which will default to the maximum ncomp value possible.
A function which applies an orthogonal tensor tubal transform.
The inverse of m.
If set to false, the data tensor will not be centered into Mean Deviation Form (see Mor et al. 2022). By default, the mean horizontal slice of the input tensor(s) are subtracted, so that all of the horizontal slices sum to 0, analgous to centering matrix data.
Collect the top singular vectors across the tensor, organized by the magnitude of the corresponding singular vector, and place them into the columns of a matrix. Corresponds to the 'matrix compression' type of scheme described in Mor et al. 2022.
A BiocParallelParam-class object
indicating the type of parallelisation. Does not have any effect if transform
functions explicitly set using m, minv.
A list containing:
The number of components used.
The centered input tensor.
The loadings matrix or tensor.
The projected data in the reduced space.
Whether x was centered.
The mean horizontal slice subtracted from x (p x t), or NULL if it was not centered.
The transform pair used.
Whether the output is in matrix form.
The (column, face) index of each component in the
transformed singular value decomposition (only when
matrix_output = TRUE).