Model evaluation for feature selection I have a dataset of gene expression data and I'm trying to find genes related to particular diseases. My labels are dichotomous (sick - not sick) and I used a Logistic regression with LASSO regularization in order to extract meaningful features (basically taking all the genes with coefficient different from zero). Hyperparameter lambda has been found using leave-one-out cross-validation. In order to find my coefficient should I train a new model using my best lambda on all the data?
I think there are some drawbacks in my approach but since I'm relatively new to feature reduction I cannot formulate a query on google that tells me if or where I am wrong. Can you help me?
 A: *

*It's better to do the standard $10$-fold cross-validation in your case, since you have $n=260$ observations. Leave-one-out cross-validation is more appropriate if the $n$ is smaller.

*You're completely right, after the cross-validation you need to train a new model on the full data with the hyperparameter $\lambda$ found by the cross-validation.

*If you're using R for this analysis (which is highly recommended), everything should be easy to implement with the cv.glmnet() function from the glmnet package, with parameter family="binomial" for the logistic regression.

*Take care that you normalized your gene expression values reasonably. Look up "RPKM" and "TPM" for a further understanding of how to model with gene expression values.
Below a minimum working example based on your comments, this should give you a smooth start with the cv.glmnet function (X is your gene expression matrix, y your 0-1-encoded disease status):
library(glmnet)

my_glmnet <- cv.glmnet(X, y, family="binomial") # default CV with 10 folds

plot(my_glmnet) # here you can see the CVMSE and the optimal lambdas, as well as the number of non-zero coefficients at the top

which_opti_lambda <- which(my_glmnet$lambda==my_glmnet$lambda.min) # this gives you the index of the optimal lambda (you can also try lambda.1se)

opti_coefficients <- my_glmnet$glmnet.fit$beta[, which_opti_lambda] # get the coefficients of the final run for the optimal lambda

which(opti_coefficients!=0) # these are the genes that were chosen by lasso cv logistic regression


