Learn R Programming

TPLSr (version 1.0.4)

TPLS: Constructor method for fitting a T-PLS model with given data X and Y.

Description

Constructor method for fitting a T-PLS model with given data X and Y.

Usage

TPLS(X, Y, NComp = 25, W = NULL, nmc = 0)

Arguments

X

Numerical matrix of predictors. Typically single-trial betas where each column is a voxel and row is observation

Y

Variable to predict. Binary 0 and 1 in case of classification, continuous variable in case of regression

NComp

(Optional) Number of PLS components to compute. Default is 25.

W

(Optional) Observation weights. By default, all observations have equal weight.

nmc

(Optional) 'no mean centering'. Default is 0. If 1, T-PLS will skip mean-centering. This option is only provided in case you already mean-centered the data and want to save some memory usage.

Value

A TPLS object that contains the following attributes. Most of the time, you won't need to access the attributes.

  • NComp: The number of components you specified in the input

  • W: Normalized version of the observation weights (i.e., they sum to 1)

  • MtrainX: Column mean of X. Weighted mean if W is given.

  • MtrainY: Mean of Y. Weighted mean if W is given.

  • scoreCorr: Correlation between Y and each PLS component. Weighted correlation if W is given.

  • pctVar: Proportion of variance of Y that each component explains.

  • betamap: v-by-NComp matrix of TPLS coefficients for each of the v variables, provided at each model with NComp components.

  • threshmap : v-by-NComp matrix of TPLS threshold values (0~1) for each of the v variables, provided at each model with NComp components.

See vignettes for tutorial