glmnet_coefs {nestedcv} | R Documentation |
glmnet coefficients
Description
Convenience function for retrieving coefficients from a glmnet::cv.glmnet model at a specified lambda. Sparsity is removed and non-intercept coefficients are ranked by absolute value.
Usage
glmnet_coefs(fit, s, ...)
Arguments
fit |
A glmnet::cv.glmnet fitted model object. |
s |
Value of lambda. See glmnet::coef.glmnet and glmnet::predict.cv.glmnet |
... |
Other arguments passed to glmnet::coef.glmnet |
Value
Vector or list of coefficients ordered with the intercept first, followed by highest absolute value to lowest.
[Package nestedcv version 0.7.9 Index]