Learn R Programming

VDA (version 1.01)

plot.cv.VDA_LE: Plot a cv.VDA_LE object

Description

Plot a the cross validation error across lambda values

Usage

## S3 method for class 'cv.VDA_LE':
plot(x, ...)

Arguments

x
Object of class 'cv.VDA_LE', the result of a call to cv.VDA_LE.
...
Not used.

Details

Plots the k-fold cross validation testing error for values across a different lambda1 and lambda2 values. Use cv.VDA_LE to produce the object of class "cv.VDA_LE".

References

Lange, K. and Wu, T.T. (2008) An MM Algorithm for Multicategory Vertex Discriminant Analysis. Journal of Computational and Graphical Statistics, Volume 17, No 3, 527-544.

See Also

VDA_LE, cv.VDA_LE

Examples

Run this code
# load data
data(zoo)

# feature matrix without intercept
x <- zoo[,2:17]

# class vector
y <- zoo[,18]

# lambda vector
lam.vec.1 <- log(2:4)/100
lam.vec.2 <- (1:3)/100

#run 3 fold cross validation across lambdas
object <- cv.VDA_LE(x, y, 3, lam.vec.1, lam.vec.2)

#plot
plot(object)

Run the code above in your browser using DataLab