After some searching I was able to find a way to extract the names of the features from each of the types of regressions performed in class. You will need to replace 'elestic.fit', 'lasso.fit', and 'ridge.fit' with the names of your outputs if you named them differently than the template document. Code follows: ```{r} tmp_coeffs <- coef(elastic.fit, s = "lambda.1se") elastic_max_coeffs <- data.frame(name = tmp_coeffs@Dimnames[[1]][tmp_coeffs@i + 1], coefficient = tmp_coeffs@x) tmp_coeffs <- coef(elastic.fit, s = "lambda.min") elastic_min_coeffs <- data.frame(name = tmp_coeffs@Dimnames[[1]][tmp_coeffs@i + 1], coefficient = tmp_coeffs@x) tmp_coeffs <- coef(lasso.fit) lasso_coeffs <- data.frame(name = tmp_coeffs@Dimnames[[1]][tmp_coeffs@i + 1], coefficient = tmp_coeffs@x) tmp_coeffs <- coef(ridge.fit) ridge_coeffs <- data.frame(name = tmp_coeffs@Dimnames[[1]][tmp_coeffs@i + 1], coefficient = tmp_coeffs@x) ```

Created by bhattel
Above and beyond ... thank you for sending this!

Feature names in glmnet models page is loading…