[R] LASSO: glmpath and cv.glmpath
Peter Schüffler
peter.schueffler at inf.ethz.ch
Fri Aug 21 15:47:12 CEST 2009
Hi,
perhaps you can help me to find out, how to find the best Lambda in a
LASSO-model.
I have a feature selection problem with 150 proteins potentially
predicting Cancer or Noncancer. With a lasso model
fit.glm <- glmpath(x=as.matrix(X), y=target, family="binomial")
(target is 0, 1 <- Cancer non cancer, X the proteins, numerical in
expression), I get following path (PICTURE 1)
One of these models is the best, according to its crossvalidation
(PICTURE 2), the red line corresponds to the best crossvalidation. Its
produced by
cv <- cv.glmpath(x=as.matrix(X), y=unclass(T)-1, family="binomial", type
="response", plot.it=TRUE, se=TRUE)
abline(v= cv$fraction[max(which(cv$cv.error==min(cv$cv.error)))],
col="red", lty=2, lwd=3)
Does anyone know, how to conclude from the Normfraction in PICTURE 2 to
the corresponding model in PICTURE 1? What is the best model? Which
coefficients does it have? I can only see the best model's cross
validation error, but not the actual model. How to see it?
Thank you,
Peter
PICTURE 1:
PICTURE 2:
More information about the R-help
mailing list