ADMM {TraceAssist}R Documentation

ADMM algorithm for weighted classification

Description

Implement an ADMM algorithm to optimize the weigthed classificiation loss.

Usage

ADMM(X,ybar,Weight,Covariate=NULL,r,srow,scol,lambda=0,rho.ini=1)

Arguments

X

A list of matrix-valued predictors.

ybar

A vector of shifted response variables.

Weight

Classification weight.

Covariate

Additional covariates including intercept. Covariate = NULL indicates no covariates.

r

The rank of coefficient matrix to be fitted.

srow

The number of zero rows in coefficient matrix.

scol

The number of zero columns in coefficient matrix.

lambda

Lagrangian multiplier. Default is zero.

rho.ini

Initial step size. Default is 1.

Value

The returned object is a list of components.

intercept - The estimated intercept of the classifier.

P_row - The left-singular vectors of the coefficient matrix.

P_col - The right-singular vectors of the coefficient matrix.

obj - Trajectory of weighted classification loss values over iterations.

iter - The number of iterations.

fitted - A vector of fitted reponse from estimated classifier.

B - The estimated coefficient matrix of the classifier.

References

Lee, C., Li, L., Zhang, H., and Wang, M. (2021). Nonparametric Trace Regression via Sign Series Representation. arXiv preprint arXiv:2105.01783.

Examples

#### Generate matrix predictors  ##########
X = list()
for(i in 1:10){
 X[[i]] = matrix(runif(4,-1,1),nrow = 2,ncol = 2)
}

#### Generate coefficient matrix #########
B = runif(2,-1,1)%*%t(runif(2,-1,1))

#### Generate response variables #########
y = NULL
for(i in 1:10){
 y = c(y,sign(sum(X[[i]]*B)+rnorm(1,sd = 0.1)))
}

#### classification with equal weights #########
res = ADMM(X,y,rep(1,10),r = 1,srow = 0,scol = 0)

### Misclassification rate on training data ######
mean(sign(res$fitted)-y)

[Package TraceAssist version 0.1.0 Index]