PrepareMatrices: Precompute matrices XTX and XTY for 'TreeGuidedGroupLasso'.

Description Usage Arguments Value See Also

View source: R/multi_task_utilities.R

Description

Computes XTX and XTY. If task specific features are supplied, the result will be a list containing the respective matrices for each task.

Usage

1
2
PrepareMatrices(Y, X = NULL, task.specific.features = list(),
  standardize = TRUE, row.weights = NULL, return.inputs = FALSE)

Arguments

Y

N by K output matrix for every task.

X

N by J1 matrix of features common to all tasks.

task.specific.features

Named list of features which are specific to each task. Each entry contains an N by J2 matrix for one particular task (where columns are features). List has to be ordered according to the columns of Y.

standardize

Standardize data (default is TRUE).

row.weights

Observation weights.

return.inputs

Return transformed (scaled and weighted, if applicable) version of X, Y and task.specific.features.

Value

List containing Y, X, task.specific.features, XTX, XTY, XT1 and YT1. Also return means and standard deviations for Y and all inputs.

See Also

TreeGuidedGroupLasso, RunGroupCrossvalidation.


tohein/linearMTL documentation built on May 17, 2019, 8:22 a.m.