Skip to content

cv.lars() function in LARS package

2 messages · minxolee, Niels Richard Hansen

#
I am trying to get familiar with the lars package and find out by repeating
the cv.lars() function, I am not getting the same result consistently. Could
someone help on that? Here is a simple reproducible example.
The last two runs of cv.lars give out different cross-validation plots.

Thanks,
minxolee

--
View this message in context: http://r.789695.n4.nabble.com/cv-lars-function-in-LARS-package-tp3434822p3434822.html
Sent from the R help mailing list archive at Nabble.com.
#
Minxolee

Cross validation is based on random splits of the data, hence
it can not be expected that the results are exactly identical.

If you want to do lasso, the glmnet package by the same authors
is a better choice.

- Niels
On 07/04/11 16.08, minxolee wrote: