Questions tagged [elastic-net]

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

Filter by
Sorted by
Tagged with
6
votes
2answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
2
votes
0answers
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 ...
0
votes
0answers
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) ...
0
votes
0answers
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 ...
3
votes
1answer
56 views

How can I go from Elastic Net Loss to Scikit-Learn Elastic Net?

I couldn't find a better title, but here's the thing... I was studying Elastic Net regularization and I found this function: $$ \text{Loss} = \sum_{i=0}^n \left(y_i - (wx_i + c)\right)^2 + \lambda_1 \...
0
votes
0answers
8 views

elastic net regression excluding few of the factor levels

am very much new to data science and still trying to understand elastic net regression. I have tried using elastic net in R using the code below. my data set is simple and it is for predicting prices ...
0
votes
0answers
48 views

Bivariate analyses vs. Boruta/random forest for removing irrelevant variables prior to penalized regression

I will be using a penalized logistic regression (elastic net) to select variables and their relative importance for predicting an outcome. The goal is to eventually create a risk prediction model, not ...
2
votes
0answers
18 views

How/whether to tune Elastic Net parameters using concentration of risk?

Typically, I see alpha and lambda tuned in elastic net models to minimize cross-validated error. Yet, I have seen a handful of articles by one set of authors where they instead tuned parameters to ...
0
votes
0answers
30 views

Interpretation of Elastic net having too low or high value of alpha

Often I found the situation that the elastic model what I fitted has optimal alpha value at 0 or 1. Or not only that situation, but also there some alphas go near to 0 or 1.(ex. 0.1 or 0.9) My ...
1
vote
1answer
39 views

How to find out hazard ratio and confidence interval from LASSO cox regression ans plot momogram in R?

I am working on a prognostic model based on time to event endpoint. The training data consists of 800 participants and test data around 400. The number of variables is 21. I was using glmnet package. ...
1
vote
0answers
25 views

Which elastic net to use in Python [closed]

I need to apply the findings of the Zhou, Hastings Paper in Python. Therefore I wanted to use the sklearn elasticnetCV. But is it the same as the elastic net estimate or the naive elastic net estimate?...
1
vote
0answers
15 views

Variables that best discriminate groups based on the glmnet package

I am trying to understand how to interpret the result from the glmnet package. What I ultimately want to find is a set of (influential or important) variables that best discriminates three groups (e.g....
0
votes
1answer
37 views

How to Improve an Elastic Net Model?

I have a dataset with $n=1500$ observations and $p=2700$ variables. I fitted an Elastic Net model with $\alpha=0.4$ and $\lambda=0.1$ I chose the $\lambda$ with cross validation, and the $\alpha$ ...
0
votes
0answers
26 views

When to use ridge regression or lasso rather than elastic net?

If one has no ex-ante information about what the L1-ratio hyperparameter should be in the context of elastic net regularization, when should one instead use lasso or ridge? This ratio is referred to ...
0
votes
1answer
64 views

Naive-elastic net and elastic net variable selection comparison

The elastic net paper (here) introduced the naive-elastic net and elastic net. The coefficient estimates of naive-elastic net are obtained by solving the problem $$\hat\beta_{naive-enet}=\text{argmin}...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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. ...
0
votes
1answer
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 ...
1
vote
0answers
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 ...
2
votes
1answer
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.
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
2answers
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) ...
0
votes
1answer
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 ...
0
votes
0answers
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?
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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...
0
votes
1answer
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 (...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
2
votes
1answer
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 ...
2
votes
0answers
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\...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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. ...
1
vote
1answer
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 ...
2
votes
0answers
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 ...
3
votes
2answers
426 views

How can a glmnet model with no coefficients have perfect performance?

I sometimes run into situations where glmnet appears to be performing well but actually selects zero features. The AUC is near-perfect but the ...
1
vote
2answers
178 views

How does repeated cross validation go about 'averaging' model coefficients?

No matter how much I google, I cannot find the answer to this simple question. Say you do 10-fold, repeated (5x) CV logistic regression with elastic net regularization. For alpha you try ...

1
2 3 4 5 6