extract_params.glmnet: extract_params.glmnet

Description Usage Arguments Value Examples

Description

Extract generalized linear model net parameters from the glmnet library

Usage

1
2
## S3 method for class 'glmnet'
extract_params(object, lambda = NULL, ...)

Arguments

object

an object of class "glmnet"

lambda

a numeric value of the penalty parameter lambda at which coefficients are required

...

further arguments passed to or from other methods

Value

a list of lists that can be modified to insert into a cell or pool

Examples

1
2
3
4
5
X <- matrix(c(rnorm(100), runif(100)), nrow=100, ncol=2)
Y <- factor(3 - 5 * X[,1] + 3 * X[,2] + rnorm(100, 0, 3) > 0)

model <- glmnet::glmnet(X, Y, family = 'binomial')
my_model_params <- extract_params(model)

aurelius documentation built on May 2, 2019, 3:43 a.m.