extract_params.glmnet {aurelius}R Documentation

extract_params.glmnet

Description

Extract generalized linear model net parameters from the glmnet library

Usage

## 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

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)

[Package aurelius version 0.8.4 Index]