Learn R Programming

CDLasso (version 1.1)

print.cv.l2.reg: Print results of Greedy Coordinate Descent for L2 Regression

Description

Print short summary of results of cross validation for Greedy Coordinate Descent for L2 Regression.

Usage

"print"(x, ...)

Arguments

x
Output of cv.l2.reg. Must be of class "cv.l2.reg"
...
N/A

Details

print.cv.l2.reg produces output from cv.l2.reg.

References

Wu, T.T. and Lange, K. (2008). Coordinate Descent Algorithms for Lasso Penalized Regression. Annals of Applied Statistics, Volume 2, No 1, 224-244.

See Also

cv.l2.reg

Examples

Run this code
set.seed(100)
n=50 
p=200
nzfixed = c(1:5)
true.beta<-rep(0,p)
true.beta[nzfixed] = c(1,1,1,1,1)

x=matrix(rnorm(n*p),p,n)
y = t(x) %*% true.beta

rownames(x)<-1:nrow(x)
colnames(x)<-1:ncol(x)

crossval2<-cv.l2.reg(x,y,10,exp((1:15))/1000)
plot(crossval2)
out2<-l2.reg(x,y,crossval2$lam.opt)

Run the code above in your browser using DataLab