[R] Caret package and lasso
mxkuhn at gmail.com
Wed Apr 7 20:03:40 CEST 2010
Thanks for the example.
I did this to make it more reproducible:
colnames(X) <- paste("V", 1:nrow(X))
# Applying caret package
data<- train(X,y, "lasso", metric="RMSE",tuneLength = 10, trControl = con)
I see your point here, but this code gives the same results:
fit2 <- enet(X, y, lambda = 0)
predict(fit2, mode = "fraction", s = data$bestTune$.fraction, type =
(at least train() names the predictors).
To me, it looks like enet is doing some filtering:
 50 100
This appears to be independent of caret. I would contact the package
maintainer off-list and ask.
More information about the R-help