powered by
Compute the solution path for semiparametric sparse discriminant analysis.
SeSDA(x,y,standardize=FALSE,lambda=NULL,alpha=1,eps=1e-7)
Input matrix of predictors. x is of dimension \(N \times p\); each row is an observation vector.
x
An n-dimensional vector containing the class labels. The classes have to be labeled as 1 and 2.
A logic object indicating whether x should be standardized after transformation but before fitting classifier. Default is FALSE.
A sequence of lambda's. If lambda is missed or NULL, the function will automatically generates a sequence of lambda's to fit model.
The elasticnet mixing parameter, the same as in glmnet. Default is alpha=1 so that the lasso penalty is used.
Convergence threshold for coordinate descent, the same as in glmnet. Default is 1e-7.
The tranformation functions.
A DSDA object fitted on transformed data.
Mai, Q., Zou, H. and Yuan, M. (2013). A direct approach to sparse discriminant analysis in ultra-high dimensions. Biometrika, 99, 29-42.
# 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 <- SeSDA(x,y) # }
Run the code above in your browser using DataLab