Learn R Programming

VDA (version 1.01)

plot.cv.VDA_R: Plot a cv.VDA_R object

Description

Plot a the cross validation error across lambda values

Usage

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

Arguments

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

Details

Plots the k-fold cross validation testing error for values across a different lambda values. Use cv.VDA_R to produce the object of class "cv.VDA_R."

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_R, cv.VDA_R

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:10)/10

#run 10 fold cross validation across lambdas
object <- cv.VDA_R(x, y, 10, lam.vec)

#plot
plot(object)

Run the code above in your browser using DataLab