Closed shahlaebrahimi closed 7 years ago
Hi, Usage questions like this aren't really appropriate for the issue tracker --- try stackoverflow or crossvalidated in the future. However, this is expected. The Lasso uses L1 regularization, which causes it to have sparse solutions (some of the coefficients are driven to 0). It's commonly used for feature selection, since the features that correspond to the non-zero coefficients are hence "selected".
see the user guide and L1 based feature selection for more details.
LASSO uses the L1 penalty to try to force as many coefficients to 0 as possible as a type of feature selection. It seems that the optimization is choosing a high alpha, forcing the values to be very small. As a sanity check you might try calculation the pearson correlation between all of your variables and the output to see if x25 is one of the higher ones.
[EDIT: @nelson-liu and I posted at the same time, but his suggestion of looking at the user guide is a good one]
I would greatly appreciate if you could guide me. In fact, I used "Bayesian Optimization " to tune hyper-parameters of Lasso but the estimated Lasso coefficients of almost all variables are equal to zero.
output:
Best regards,