Developed @ Melbourne Integrative Genomics.

block_tpls(
  a,
  y_ind,
  ncomp = 1,
  design,
  scheme = "horst",
  tau = 1,
  m = NULL,
  minv = NULL,
  mode = "regression",
  pairwise_scoring = "top_singular",
  center = TRUE,
  tol = 1e-06,
  max_iter = 100,
  solve_dual = TRUE,
  transform_y = NULL,
  face_scaling = NULL,
  bpparam = NULL
)

Arguments

a

A list of tensor inputs (termed 'blocks') measured on the same samples. The target block may instead be a vector or an n x q matrix, for a response fixed per subject (see transform_y).

y_ind

Index of "target" block in a.

ncomp

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

design

Numeric matrix of size length(x) x length(x) with values between 0 and 1; the i,j entry in the matrix indicates the strength of the relationship to be modelled between the i-th and j-th blocks. A value of 0 indicates no relationship, with 1 being the maximum. Alternatively, one can input "null" for a fully disconnected design (feature blocks are only connected to the target block at strength 1, but not to each other), or "full" for a fully connected design (target and feature blocks are all connected to each other equally at strength 1), or a single scalar value between 0 and 1 which will designate the relationship between feature blocks, with the relationships to the target block being 1. design must be explicitly set.

scheme

One of "horst", "factorial" or "centroid", "horst" by default.

tau

Shrinkage constant to provide better estimate of covariance, introduced by Ledoit and Wolf (2004). NULL by default, but can set to "optimal" to use optimal shrinkage constants from Schafer and Strimmer (2005), or a single scalar value between 0 and 1.

m

A function which applies an orthogonal tensor tubal transform.

minv

The inverse of m.

mode

Currently supports tensor analogues of canonical, regression, and svd PLS modes. Defaults to "regression" mode.

pairwise_scoring

The method on which to select the face of each tensor for each iteration of block.pls. Currently supports "top_singular" (pick based on weighted sum of top svd diagonal value within all 2-block combinatations), "sum_singular" (sum of diagonal values) and "frobenius" (top_singular but approximated with the Frobenius norm which is an upper bound). "top_singular" by default, but consider selecting "frobenius" for speed as it avoids a full svd decomposition.

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.

tol

Positive scalar used as convergence criteria/tolerance during the RGCCA iterative process. Defaults to 1e-06.

max_iter

Integer specifying the maximum number of iterations to be run for each 2D RGCCA call.

solve_dual

For high dimensional data where n > p, use a dual formulation in the matrix RGCCA step that works with the gram matrix instead of the raw data. TRUE by default, only recommended to set to FALSE for testing purposes.

transform_y

Whether to m-transform the target block with the other blocks. NULL by default, which decides from its shape: a vector or an n x q matrix is a response fixed per subject and is not transformed, so that every face of the other blocks is compared with the response itself; an order-3 tensor is transformed. An untransformed target block is deflated on every face after each component. TRUE copies a subject-fixed response over time and transforms it; FALSE needs a target block that is the same at every time point. See tpls.

face_scaling

How faces compete when each component picks one. "frobenius" divides each face's score by the combined Frobenius norm of the other blocks on that face, times that of the target block, so that faces compete on a common scale; "none" compares the raw scores. It affects which face is chosen only. NULL by default: "frobenius" for an untransformed target block, "none" otherwise. See tpls.

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.

a

The input list of centered tensor blocks.

y_ind

The index of the target block in a.

design

The design matrix used for block relationships.

scheme

The RGCCA scheme used ("horst", "factorial", "centroid").

mode

The PLS mode used ("canonical" or "regression").

transform_y

Whether the target block was m-transformed.

face_scaling

How faces were compared: "frobenius" or "none".

pairwise_scoring

The pairwise_scoring method used.

loadings

List of loadings matrices per block (p_i x ncomp).

projected

List of projected variates per block (n x ncomp).

iters

Vector of iteration counts for each component.

faces

Vector of selected tensor face indices per component.

center

Whether the blocks were centered.

mean_slices

List of the mean horizontal slices subtracted from each block, or NULL if they were not centered.

m, minv

The transform pair used.

x_reg_coefs

List of each X block's deflation coefficients (p_i x ncomp), NULL for the target block.

y_reg_coefs

In regression mode, list of the target block's coefficients on each X block's projection (q x ncomp), NULL for the target block; NULL in canonical mode.

Note

When design = "full", tau = 1, setting scheme to "horst", "factorial" or "centroid" yields method SUMCOV, SSQCOV, SABSCOV respectively.

Author

Brendan Lu