SOS: Solution path for sparse discriminant analysis

Description Usage Arguments Details Value Author(s) References Examples

View source: R/SOS.R

Description

Compute the solution path for sparse optimal scoring (SOS).

Usage

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

Arguments

x

Input matrix of predictors. x is of dimension N*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 SOS. 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.

Details

The function obtains the solution path of sparse optimal scoring model through dsda.

Value

beta

Output variable coefficients for each lambda.

lambda

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

Author(s)

Yuqing Pan, Qing Mai, Xin Zhang

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

1
2
3
4
5
6
7
8
    data(GDS1615)   ##load the prostate data
    x<-GDS1615$x
    y<-GDS1615$y
    x=x[which(y<3),]
    y=y[which(y<3)]
    obj.path <- SOS(x, y)
    
    

TULIP documentation built on Jan. 13, 2021, 3:14 p.m.

Related to SOS in TULIP...