Hi Bruno,

You advised following
no need to find the best s value. CV does it for you:
cvres<-cv.lars(X,Y,K=10,type='lasso')
sAtBest<-cvres$fraction[which.min(cvres$cv)]
fits <- predict.lars(object, type="coefficients", s=sAtBest, mode="fraction")
in thread https://stat.ethz.ch/pipermail/r-help/2007-June/133982.html

My problem is that, cvres$cv is non empty but cvres$fraction is null so I am 
unable to fetch sAtBest.
What am I doing wrong here?
Thanks in anticipation.

Regards,
Bhuvneshwar
Algorithm Engineer
Adobe

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to