Learn R Programming

TULIP (version 1.0.2)

ROAD: Solution path for regularized optimal affine discriminant

Description

Compute the solution path for regularized optimal affine discriminant (ROAD).

Usage

ROAD(x,y,standardize=FALSE,lambda=NULL,eps=1e-7)

Arguments

x

Input matrix of predictors. x is of dimension \(N \times p\); each row is an observation vector.

y

An n-dimensional vector containing the class labels. The classes have to be labeled as 1 and 2.

standardize

A logic object indicating whether x should be standardized before performing ROAD. Default is FALSE.

lambda

A sequence of lambda's. If lambda is missed, the function will automatically generates a sequence of lambda's to fit model.

eps

Convergence threshold for coordinate descent, the same as in glmnet. Default is 1e-7.

Value

beta

Output variable coefficients for each lambda.

lambda

The sequence of lambda's used in computing the solution path.

Details

The function obtains the solution path of ROAD through dsda.

References

Mai, Q. and Zou, H. (2013), "A note on the connection and equivalence of three sparse linear discriminant analysis methods." Technometrics, 55, 243-246.

Examples

Run this code
# NOT RUN {
    data(GDS1615)   ##load the prostate data
    x<-GDS1615$x
    y<-GDS1615$y
    x=x[which(y<3),]
    y=y[which(y<3)]
    obj.path <- ROAD(x, y)
    
    
# }

Run the code above in your browser using DataLab