# how to use elastic net to select a set of features

I have a dataset with 500 samples and 100 features. I need to come up with a set of features. The management prefer a model with a smaller set of features. How exactly should I use elastic net to do it?

I understand elastic net is 'embedded method' for feature selection. It basically use a combination of L1 and L2 penalty to shrink the coefficients of those 'unimportant' features to 0 or near zero.

Should I run the model and look at the coefficients of each variables and kind of 'arbitrarily' select top n features based on the absolute value of the coefficients? After the set of features being selected, I guess I need to run the model again with the selected set of features. Is this method correct? Is that typically what people are doing feature selection with elastic net?

An additional question. Lasso can shrink a large number of coefficient of features to zero. Can someone comment on feature selection with lasso vs elastic net?

• LASSO and ELASTIC NET both perform feature selection and that's their whole purpose, so yes you can use them for this. You don't need to select top n features, since you can play with the arguments $\alpha$ and $\lambda$ to get an arbitrary number of non-negative coefficients. – user2974951 Dec 11 '18 at 7:11