Note: always returns a compressed-matrix form output.

tplsda(
  x,
  y,
  multi_label = FALSE,
  ncomp = NULL,
  m = NULL,
  minv = NULL,
  center = TRUE,
  transform_y = multi_label,
  face_scaling = NULL,
  bpparam = NULL
)

Arguments

x

Tensor input.

y

A vector / column matrix / column tensor with n class labels, or a n x t matrix / n x 1 x t tensor if multi_label == TRUE.

multi_label

Set to TRUE if y contains repeated class measurements across the t timepoints specified in the x tensor.

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.

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.

transform_y

Whether to m-transform the class indicators with x. Defaults to multi_label: a single label per subject is not transformed, so every face of x is compared with the labels themselves; labels repeated over time are transformed. See tpls.

face_scaling

How faces compete when each component picks one; see tpls. NULL by default: "frobenius" for a single label per subject, "none" for labels repeated over time.

bpparam

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

Value

Adds y_original: the original labels input (vector/matrix/tensor) passed to tplsda(); multi_label; and levels, the class names in the order of the indicator columns.

Details

Developed @ Melbourne Integrative Genomics

Author

Brendan Lu