| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 9 months |
| seen | Apr 19 '12 at 17:08 | |
| stats | profile views | 6 |
|
Dec 8 |
awarded | Self-Learner |
|
Apr 19 |
answered | Open source implementation elastic net in C or C++ |
|
Sep 8 |
revised |
How is the intercept computed in GLMnet? added 216 characters in body |
|
Aug 3 |
awarded | Supporter |
|
Aug 3 |
comment |
How is the intercept computed in GLMnet? However, even when standardization is applied (and therefore mean centering) on the predictors in the algorithm, they take the unstandardized data (therefore $\bar{x} \ne 0 $, in general) to fit the different intercepts displayed by glmnet. They do use the same $\beta_0=constant=\bar{y}$ for updating the coefficients but fit an intercept with the raw data, and they do it a posteriori. |
|
Aug 3 |
comment |
How is the intercept computed in GLMnet? Indeed, nervertheless the authors explicitly said in their article : $\beta_0=\bar{y}$ for all values of $\alpha$ and $\lambda$, and moreover they don't say at which point of the algorithm it is computed |
|
Aug 3 |
awarded | Teacher |
|
Aug 3 |
awarded | Scholar |
|
Aug 3 |
accepted | How is the intercept computed in GLMnet? |
|
Aug 3 |
answered | How is the intercept computed in GLMnet? |
|
Aug 2 |
comment |
How is the intercept computed in GLMnet? It's ok I found the answer looking at scikit-learn python code (because the glmnet source code is in Fortran and it is not my cup of tea). I will share it later if anyone is interested. Thanks anyway ! |
|
Aug 1 |
comment |
How is the intercept computed in GLMnet? Ok, no problem. The point is I already did that : standardizing the predictors ($x_i$'s) and beginning with an intercept equal to the mean of the explained variable ($\frac{1}{N}\sum_{i=1}^{N}y_i$) when all coefficient are zeros, but my intercept doesn't change with $\lambda$. Indeed since I compute the updated coefficients with the previous value of the intercept $\beta_0$, if I want to deduce the "new" $\beta_0$ from the formula above, it gives me exactly the same value as before, and therefore always the mean of the predictors $y_i$'s. Do you have an idea for getting different $\beta_0$'s? |
|
Aug 1 |
comment |
How is the intercept computed in GLMnet? What do you think ? |
|
Aug 1 |
comment |
How is the intercept computed in GLMnet? Thanks for your interest in my issues but equation 17 refers to another algorithm, the one for logistic regression. I'm implementing firstly the "Naive Update" mode of the elastic net (for penalized linear regression), and there are no weights assigned to the observations (else than $\frac{1}{N}$), and even if so, the intercept is not updated this way so I don't think it's the solution. I think I need to find a way to deduct an intercept considering the new updated coefficient for each $\lambda$. Something like : $\beta_0=\frac{1}{N}\sum_{i=1}^{N}(y_i-\sum_{j=1}^{p}x_{ij}\beta_j)$ |
|
Jul 29 |
comment |
How is the intercept computed in GLMnet? Could you precise your idea please ? Which expression of weights should I consider ? |
|
Jul 29 |
comment |
How is the intercept computed in GLMnet? I took the mean of the explained variable because in the article i quoted, the authors of this method write that they do use the mean of the Y_i (the explained variable observations) for all values of alpha and lambda. Now, looking at the output of glmnet function, i guess it's not the case for all lambdas. So that does not tell me how to compute the intercepts for each regularization parameter lambda. |
|
Jul 29 |
awarded | Student |
|
Jul 29 |
awarded | Editor |
|
Jul 29 |
revised |
How is the intercept computed in GLMnet? deleted 33 characters in body |
|
Jul 29 |
revised |
How is the intercept computed in GLMnet? edited tags |