Learn R Programming

cggd (version 0.8)

cv.cggd: Computes K-fold cross-validated error curve for cggd

Description

Computes the K-fold cross-validated mean squared prediction error for cggd.

Usage

cv.cggd(x, y, nfolds = 6, kmax=40 , trace = FALSE, plot.it = TRUE, se=TRUE, ...)

Arguments

x
Input to cggd
y
Input to cggd
nfolds
Number of folds
kmax
Max number of iterations per model
trace
Show computations
plot.it
Plot it
se
Include standard error bands
...
Additional arguments to cggd

Value

cv
The CV loss curve at each value of k
cv.error
The standard error of the CV curve

References

Cun-Hui Zhang (2007) "Continuous Generalized Gradient Descent" Journal of Computational and Graphical Statistics ; see also http://stat.rutgers.edu/~cunhui/software/CGGD.html.

Examples

Run this code
data(Wine)
attach(Wine)
cv.cggd(x.learning,y.learning,kmax=40,fctr=1e3)
detach(Wine)

Run the code above in your browser using DataLab