unpack.glmnet | R Documentation |
A function to quickly unpack a glmnet model object and calculate an optimal model from the regularization path.
unpack.glmnet(mod, ic.k)
mod |
the glmnet model |
ic.k |
the information criterion value. AIC is |
This is a small utility we wrote to deal with the slow methods dispatch for S4
classes. The more straightforward option is the coef()
method for glmnet
objects but when trying to make thousands of calls a second, that can be very slow
A list
coef |
a matrix of coefficients |
intercept |
the intercepts |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.