Timeline for Variable importance from GLMNET
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 5, 2019 at 8:50 | comment | added | Christopher John | I think std_coefs <- coefs[-1, 1] * sds should be std_coefs <- cs[-1, 1] * sds, no? | |
| Feb 8, 2019 at 19:17 | comment | added | James Hirschorn | Also, to standardize the intercept one uses: means <- apply(X, 2, mean); std_intercept = ceofs[1, 1] + sum(coefs[-1, 1] * means) again regardless of standardize, correct? BUT, then if we fit with intercept = FALSE we still end up with a nonzero intercept after standardizing the coefficients, so we get an intercept no matter what?? | |
| Feb 8, 2019 at 18:53 | comment | added | James Hirschorn | This gives the correct standardized coefficients, whether the glmnet object was created with standardize = TRUE or standardize = FALSE, yes? | |
| Sep 25, 2018 at 14:48 | comment | added | Antoine Lizée | Yes, it's a typo ( Yet another reminder to never type examples without running the code ;-) ) Thanks for catching it, it's fixed. | |
| Sep 25, 2018 at 14:47 | history | edited | Antoine Lizée | CC BY-SA 4.0 | added 10 characters in body |
| Aug 2, 2018 at 21:59 | comment | added | VictorZurkowski | Indeed, you multiply the coefficient by $\sigma_x$. The linear score is of the form $\dots + b \cdot x+\dots = \dots + (b\cdot \sigma_x) \cdot (x-\mu)/\sigma_x + \dots $, i.e.: $b \cdot \sigma_x = $ coefficient of standardized $x$. | |
| Sep 9, 2017 at 13:35 | comment | added | B_Miner | Antoine - Can you confirm that multiplication and not division is proper here? | |
| Feb 3, 2017 at 14:01 | comment | added | Kent Johnson | I think your last line should be std_coefs <- coefs[-1, 1] * sds. This corresponds with your note which says $$b^* = b \cdot \sigma_x$$ for the Agresti method. I find this counter-intuitive but correct. The non-standardized coefficient is the amount of change in the result for a unit change in the predictor. Normalized coeffcifient is the change in the result for a 1-standard-deviation change in the predictor; to get this, you must multiply by the SD. | |
| May 8, 2016 at 0:05 | history | answered | Antoine Lizée | CC BY-SA 3.0 |