# Questions tagged [elastic-net]

A regularization method for regression models that combines the penalties of lasso and of ridge regression.

272 questions
Filter by
Sorted by
Tagged with
284 views

### Math behind applying elastic net penalties to logistic regression

I understand how Ridge / Lasso / Elastic Net regression penalties are applied to the linear regression's cost function, but I am trying to figure out how they are applied to Logistic Regression's ...
22 views

### Solving coefficient sum constrained elastic net with quadratic objective term

I am looking for an algorithm to solve an equality constrained elastic net. There are two adaptations I need to make to the standard elastic net. First the objective function includes a quadratic ...
17 views

### Resources for lasso regression and elastic net

I am interested in learning more about lasso regression and elastic net, can someone provide links that they felt helpful? If there are books that have a step-to-step guide on how to conduct these ...
38 views

### Minimizing an elastic net loss function

Reading through Andrew Ng's cs229 notes he shows here on page 10 how you can minimize a loss function $J\left( \theta \right)$ representing the sum of least squares by taking the gradient with respect ...
21 views

### lambda scaling in elastic net regression with glmnet vs sklearn

I am trying to get results to agree between glmnet and sklearn elastic net regression for a specific case where I can't normalise the response variable y. I know that for ridge regression (alpha = 0) ...
24 views

### Shrinkage regression (Elastic net) produces worse fit on same data when providing more variables compared to previous fit?

I am currently fitting elastic net models on 45 data points (I know, it's not much) in the context of time series analysis. For context, I want to build a forecast model that forecasts 3 months into ...
56 views

15 views

### Hyperparameter estimation on gaussian regression using elastic net

I have been tasked with explaining how a set of 50 environmental variables can affect 300 plus measures of anatomical regions. I am thinking of using gaussian regression as it can handle multiple ...
46 views

### Diagnostic checks and optimization of (ElasticNet) penalized logistic regression models (using glmnet and caret)

I was recently advised to use a penalized logistic regression model to better grasp what drivers influence my outcome (i.e. the eradication success/failure of an invasive plant species after a ...
28 views

### replacement for lmmen

I am using R and I want to apply Elastic net for parameter selection to the lmer function from the lmerTest package https://cran.r-project.org/web/packages/lmerTest/lmerTest.pdf. I saw that a ...
95 views

### Including Fixed Effects in a LASSO/Elastic Net regression model (in R)

So this is a question has vaguely been asked before (see 1 and 2) but I have not been able to find a conclusive answer for anywhere. Essentially I have panel data for 300 US firms between 2012-2020 ...
40 views

### Is there any example of 2-step predictive model?(i.e. classification model coupled with regression models for each subclass)

I have a large dataset with 10,000+ individuals and many many biological features (>5000). And I want to use these features to build a linear model (e.g. elastic net) to predict their clinical ...
28 views

### Can I test a model on class-imbalanced data if it was trained on class-balanced data?

Background: Previously, I ran my elastic net model on class-imbalanced data. I found out this is bad practice generally, so I downsampled the data to resolve the class imbalance. ...
44 views

### Can I run glm after MI with Elastic-Net non-zeroed coefficients from 'miselect'?

I have data with n = 80 and 10 predictors, and ran MI using MICE, followed by Variable Selection for Multiply Imputed Data using ‘miselect’ and finally have 4 non-zeroed coefficients. Since ...
22 views

### Would a log transformation on my features change the elastic net result

We built the elastic net model on a set of my features and control features. With that, we did various experiments to discuss the importance of the selected features. For example, we showed more of my ...
81 views

### How is the standard error calculated for the lambda.1se output in the cv.glmnet function?

I understand that lambda.1se is the largest lambda that gives MSE within one standard error of the minimum MSE. But how is the standard error calculated exactly.
31 views

### All p-values rendered non-significant in Cox model after initializing coefficients from glmnet

I have a set of 200 genes that are split into numerical high and low, encoded as (1/2). I have set this variable this way for linearity of the model. Also, stratified by cancer and normal cases. I ...
201 views

### Elastic net regression: Should I tune for lambda at the same time as alpha with cv.glmnet?

I am looking for the best $\alpha$ (=ratio between L1 and L2 penalty) and $\lambda$ (=penalty strength) for my elastic net regression model, using the R package ...
73 views

### Elastic Net / Lasso as a solution to multiple comparisons and p-hacking? Inferential/Descriptive stats

I have a very large dataset, and I'm trying to find which variable(s) may describe the truth about a certain variable. I've considered just doing OLS on variables that make logical sense. But I've ...
22 views

### Multicollinearity and case:predictor ratio problems

I have 444 cases and 60ish predictors that suffer from collinearity. The predictors fall into three categories (vol, thickness and demographics). I would prefer to subdivide my cases into 4 (age) ...
32 views

### What is the effect of PCA on the Error?

I am fitting an ElasticNet model using an array of values for alpha and l1_ratio. I then plot the result of the negative root mean squared error from cross validation in a heatmap, which gives me the ...
15 views

### Why does the value of the penalized ridge is divided by 2 in GLMNET? [duplicate]

If you look at GLMNET Vignette, it shows that it solves for the gaussian case: But why does it divide the value of $\parallel \beta \parallel_2^2$ by 2?
10 views

### Optimizing models for paired analysis

I want to train a model to classify pre and post samples for 50 patients. The algorithm needs to discriminate ...
84 views

### How should I interpret the case where elasticnet gives zero features

I am using elasticnet for the purpose of determining feature importance. In case it is relevant, this is a high-dimensionality model with $n\ll p$. I have seen cases before where Lasso, i.e. logistic ...
66 views

### Is the use of elastic net for variable selection purposes a form of data dredging?

Is the use of elastic net for variable selection purposes a form of data dredging? I switched from using stepwise regression procedure for variable selection to elastic net, but I actually do not know ...
101 views

### The cumulative probability model with ordinalNet, using an elastic net penalty: more coefficients than expected equal to zero

I am trying to fit a cumulative probability model (ordinal logistic regression with 17 categories and 827 observations) with elastic net penalty using the ordinalNet...
93 views

### What to report in cross validated elastic net regression?

Let's assume I want to construct a regression model to predict a specific outcome variable but I don't have enough data to do a proper train-test set split (n = 200). I have 7 predictor variables (...
12 views

### Different results after updating the code (glmnet function) [duplicate]

I wrote a code performing an elastic net regression with a 10-fold-crossvalidation. the original dataset has 190 variables and 1402 observations. The result were 70 remaining coefficients in the final ...
38 views

### Normalize parameter in sklearn Ridge, Lasso, ElasticNet [duplicate]

Is there any risk or disadvantage to set normalize=True when using ridge, lasso or elasticnet or does it only have benefits? And what is the impact on the range of alpha if it is set to True, does it ...
192 views

### Counterintuitive coefficients in elastic net logistic regression

In a model run of elastic net logistic regression, I encountered a very counterintuitive coefficient. I have looked into the data, model and script, but, I still cannot seem to wrap my head around the ...
360 views

### What really is 'glmnet' when used in caret in R for binary classification?

like lasso and ridge, elastic net can also be used for classification by using the deviance instead of the residual sum of squares. This essentially happens automatically in caret if the response ...
36 views

### Strong rules for the elastic net

In their paper (here), Tibshirani et al defined the lasso as the solution to  \text{argmin}_{\boldsymbol{\beta}}\frac{1}{2}\left\Vert \mathbf{y}-\mathbf{X}\boldsymbol{\beta}\right\Vert ^{2}+\lambda\...
64 views

### Is it correct to evaluate individual drivers with the AUC value?

I have a discussion with my supervisor about the usage of AUC to determine, basically, the importance of three different drivers consisting of multiple variables each. He claims I can look into the ...
29 views

### Correlated predictors with different signs in elastic net

I am struggling with the interpretation of my elastic net results and hope someone might be able to help ... I've done an elastic net regression in R (based on glmnet), with different levels of alpha ...
523 views

### How do I compare cv.glmnet models with AIC?

I am using the glmnet package in R, and not(!) the caret package for my binary ElasticNet regression. I have come to the point ...
155 views

### Different outcome of cv.glmnet coefficients

I know, the question has been posted many times, but none of the answers fixed my problem. I still get different results each time I run the cv.glmnet on my data. ...
712 views

### How do I calculate confidence intervals on an elastic net regression in R

I am performing an elastic net regression on my data n = 34, p = 46 I first built the model using the "caret" package with the cross validation method to set the optimal alpha and lambda ...
183 views

### Elastic net: how to tune for both lambda and alpha? Why is caret better than cv.glmnet?

I'm learning how to use R to fit Elastic Net models using the glmnet package. There appears to be a function, cv.glmnet that ...