Learn R Programming

kerndwd (version 1.0.1)

plot.kerndwd: plot DWD coefficients

Description

Plot the solution paths for a fitted kerndwd object.

Usage

## S3 method for class 'kerndwd':
plot(x, color=FALSE, ...)

Arguments

x
A fitted ``kerndwd"" model.
color
If TRUE, plots the curves with rainbow colors; otherwise, with gray colors (default).
...
Other graphical parameters to plot.

Details

Plots the solution paths as a coefficient profile plot. This function is modified based on the plot function from the glmnet package.

References

Wang, B. and Zou, H. (2015) ``Another Look at DWD: Thrifty Algorithm and Bayes Risk Consistency in RKHS". http://arxiv.org/abs/1508.05913v1.pdf Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized linear models via coordinate descent," Journal of Statistical Software, 33(1), 1--22 http://www.jstatsoft.org/v33/i01/paper

See Also

kerndwd, predict.kerndwd, coef.kerndwd, plot.kerndwd, and cv.kerndwd.

Examples

Run this code
data(Haberman)
Haberman$X = scale(Haberman$X, center=TRUE, scale=TRUE)
lambda = 10^(seq(-3, 3, length.out=10))
kern = rbfdot(sigma=1)
m1 = kerndwd(Haberman$X, Haberman$y, kern, qval=1, 
  lambda=lambda, eps=1e-5, maxit=1e5)
plot(m1, color=TRUE)

Run the code above in your browser using DataLab