VDA_R(x, y, lambda)
cv.VDA_R
, which uses K-fold cross validation to determine the optimal value.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
.lambda
that was used during analysis.k-1
outcome categories. The coefficient matrix is used for classifying new cases.lambda
, refer to cv.VDA_R
.For high-dimensional setting and conduct variable selection, please refer to VDA_LE
.
#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_R(x, y)
Run the code above in your browser using DataLab