VDA_LE
is an elaboration of VDA that simultaneously conducts classification of $k$ possible categories and variable selection of p features, based on a data set of n cases. Variable selection is imposed using L1 (Lasso) and group Euclidean penalties.VDA_LE(x, y, lambda1, lambda2)
lambda1
, refer to cv.VDA_LE
.lambda1
, refer to cv.VDA_LE
x
with an intercept vector added as the first column. All entries in the first column should equal 1
.y
. All elements should be integers between 1 and classes
.lambda1
and the second is lambda2
k-1
outcome categories. The coefficient matrix is used for classifying new cases.VDA_LE
carries out cyclic coordinate descent in the context of VDA to minimize the loss function. By adding lasso ($L1$-norm) and group Euclidean penalties to the VDA loss function, unnecessary predictors are elimnated, adding parsimony and making the model more interpretable. Lasso penalties are applied to each predictor coefficient separately, while Euclidean penalties couples the coefficients of a single predictor and penalize the group collectively. If lambda1=0
, then the overall penalty reduces to only group penalties. When lambda2=0
, then the overall penalty reduces to the lasso. With these penalties in place, cyclic coordinate descent accelerates estimation of all coefficients.lambda1
and lambda2
, see cv.VDA_LE
For VDA without variable selection, see VDA_R
.
#load dataset from package
data(zoo)
#matrix containing all predictor vectors
x <- zoo[,2:17]
#outcome class vector
y <- zoo[,18]
#run VDA
out<-VDA_LE(x,y)
Run the code above in your browser using DataLab