adjten {catch}R Documentation

Adjust tensor for covariates.


Adjusts tensor with respect to covariates to achieve a more accurate performance. Tensor depends on the covariates through a linear regression model. The function returns the coefficients of covariates in regression and adjusted tensor list for further classifier modeling. It estimates coefficients based on training data, and then adjusts training tensor. When testing data is provided, the function will automatically adjust testing data by learned coefficients as well.


adjten(x, z, y, testx = NULL, testz = NULL, is.centered = FALSE)



Input tensor or matrix list of length N, where N is the number of observations. Each element of the list is a tensor or matrix. The order of tensor can be any integer not less than 2.


Input covariate matrix of dimension N*q, where q<N. Each row of z is an observation.


Class label vector of dimention N*1. For K class problems, y takes values in \{1,\cdots,\code{K}\}.


Input testing tensor or matrix list. Each element of the list is a test case. When testx is not provided, the function will only adjust training data.


Input testing covariate matrix with each row being an observation.


Indicates whether the input tensor and covariates have already been centered by their within class mean or not. If is.centered is FALSE, the function adjten will center data by class. If is.centered is TRUE, the function will skip the centering step.


The model CATCH assumes the linear relationship bewteen covariates and tensor as


where \boldsymbol{α} is the matrix of estimated coefficient of covariates. The function removes the effects of covariates on response variable through tensor and obtain \mathbf{X}-\boldsymbol{α}\overline{\times}_{M+1}\mathbf{Z} as adjusted tensor to fit tensor discriminant analysis model.

In estimating \boldsymbol{α}, which is the alpha in the package, adjten first centers both tensor and covariates within their individual classes, then performs tensor response regression which regresses {\mathbf{X}} on {\mathbf{Z}}.



The estimated coefficients of covariates to plug in classifier. gamma is the \boldsymbol{γ}_k defined function catch of dimension q*(K-1), where q is the size of covariates and K is the number of classes.


Adjusted training tensor list \mathbf{X}-\boldsymbol{α}\overline{\times}_{M+1}\mathbf{Z} after adjusting for covariates. The effect of the covariate is removed.


Adjusted testing tensor list \mathbf{X}-\boldsymbol{α}\overline{\times}_{M+1}\mathbf{Z} after adjusting for covariates. The effect of the covariate is removed.


Yuqing Pan, Qing Mai, Xin Zhang


Pan, Y., Mai, Q., and Zhang, X. (2018) Covariate-Adjusted Tensor Classification in High-Dimensions, arXiv:1805.04421.

See Also



n <- 20
p <- 4
k <- 2
nvars <- p*p*p
x <- array(list(),n)
vec_x <- matrix(rnorm(n*nvars),nrow=n,ncol=nvars)
vec_x[1:10,] <- vec_x[1:10,]+2
z <- matrix(rnorm(n*2),nrow=n,ncol=2)
z[1:10,] <- z[1:10,]+0.5
y <- c(rep(1,10),rep(2,10))
for (i in 1:n){
  x[[i]] <- array(vec_x[i,],dim=c(p,p,p))
obj <- adjten(x, z, y)

[Package catch version 1.0.1 Index]