extract_params.cv.glmnet {aurelius}R Documentation

extract_params.cv.glmnet

Description

Extract generalized linear model net parameters from a cv.glmnet object

Usage

## S3 method for class 'cv.glmnet'
extract_params(object, lambda = object[["lambda.1se"]],
  ...)

Arguments

object

an object of class "cv.glmnet"

lambda

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

...

further arguments passed to or from other methods

Value

PFA as a list of lists that can be inserted 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::cv.glmnet(X, Y, family = 'binomial')
my_model_params <- extract_params(model)

[Package aurelius version 0.8.4 Index]