Description Usage Arguments Details Value See Also Examples
For the graphic one could consider this just a smart "melting" (
reshape2
's melt
) of the beta matrix in the
glmnet
object.
1 |
x |
|
data frame returned has the following columns:
log(lambda) for the lambda values examined
name of variable in the model
for the specific variable
when log(lambda)
was .log.lambda
The L_1 norm of the beta values for specific each
.log.lambda
. That is, ∑_{i=1}^p beta_i(λ)
deviance ratio, the fraction of (null) deviance explained by the model. The deviance is defined to be 2*(loglike_sat - loglike), where loglike_sat is the log-likelihood for the saturated model (a model with a free parameter per observation). Hence .dev=1-dev/nulldev.
number of beta for that .log.lambda
value
that were non-zero
data frame, see details.
broom
's tidy
and use with the
same object.
1 2 3 4 5 6 | library(tidyverse)
library(glmnet)
glmnet.object <- glmnet(y = iris$Sepal.Length,
x = model.matrix(Sepal.Length~., data = iris))
dfCompile.glmnet(glmnet.object) %>% head
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.