Skip to content

LASSO coefficients for a specific s

1 message · Bruno C.

#
Hy,
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")

...
Ciao
Bruno
------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada