glmnet_coefs: glmnet coefficients

View source: R/nestedcv.R

glmnet_coefsR Documentation

glmnet coefficients

Description

Convenience function for retrieving coefficients from a 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 cv.glmnet fitted model object.

s

Value of lambda. See coef.glmnet and predict.cv.glmnet

...

Other arguments passed to coef.glmnet

Value

Vector or list of coefficients ordered with the intercept first, followed by highest absolute value to lowest.


nestedcv documentation built on Dec. 5, 2022, 5:25 p.m.