Displaying 2 results from an estimated 2 matches for "dfmax".
Did you mean:
fmax
2010 Jul 08
1
glmnet - choosing the number of features
Hi,
I am trying to use the glmnet package to do some simple feature selection.
However, I would ideally like to be able to specify the number of features
to return (the glmnet package, as far as I can tell, only allows
specification of a regularization parameter, lambda, that in turn returns a
model with a specific number of non-zero features).
Is there a straightforward way of calculating the
2011 Jun 06
1
Lasso for k-subset regression
Dear R-users
I'm trying to use lasso in lars package for subset regression, I have a
large matrix of size 1000x100 and my aim is to select a subset k of the 100
variables.
Is there any way in lars to fix the number k (i.e. to select the best 10
variables)
library(lars)
aa=lars(X,Y,type="lasso",max.steps=200)
plot(aa,plottype="Cp")
aa$RSS
which.min(aa$RSS)