Developed @ Melbourne Integrative Genomics. Intuition: Fourier-based m transforms compact the data across time points, but preserve the information association for each sample and each feature. In doing so, pls works by calculating the singular vectors associated with a 'global' (across time points) top singular value, and deflating just that relevant face.

tpls(
  x,
  y,
  ncomp = NULL,
  m = NULL,
  minv = NULL,
  mode = "regression",
  center = TRUE,
  matrix_output = TRUE,
  bpparam = NULL
)

Arguments

x

Tensor input.

y

Tensor input.

ncomp

The estimated number of components. ncomp must be explicitly set as an integer in tpls.

m

A function which applies an orthogonal tensor tubal transform.

minv

The inverse of m.

mode

Currently supports tensor analogues of canonical ("canonical"), regression ("regression"), and svd ("tsvdm") PLS variants. Defaults to "regression".

center

If set to false, the data tensor will not be centralized 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.

matrix_output

Note: FALSE ONLY AFFECTS THE OUTPUT IN "tsvdm" MODE. TRUE by default. Collects 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.

bpparam

A BiocParallelParam-class object indicating the type of parallelisation. Does not have any effect if transform functions explicitly set using m, minv.

Value

A list containing:

ncomp

The number of components used.

x

The centered input tensor X.

y

The centered input tensor Y.

mode

The PLS mode used: "canonical", "regression", or "tsvdm".

x_loadings

Matrix of X loadings (p x ncomp), or loadings tensor if mode = "tsvdm" AND matrix_output = FALSE.

y_loadings

Matrix of Y loadings (q x ncomp), or loadings tensor if mode = "tsvdm" AND matrix_output = FALSE.

x_projected

Matrix of X projections (n x ncomp), or proections tensor when mode = "tsvdm" AND matrix_output = FALSE.

y_projected

Matrix of Y projections (n x ncomp), or proections tensor when mode = "tsvdm" AND matrix_output = FALSE.

features

Vector of selected feature indices per component (only when matrix_output = TRUE).

faces

Vector of selected tensor face indices per component (only when matrix_output = TRUE).

Author

Brendan Lu