print.glmnet: print a glmnet object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/print.glmnet.R

Description

Print a summary of the glmnet path at each step along the path.

Usage

1
2
## S3 method for class 'glmnet'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

x

fitted glmnet object

digits

significant digits in printout

...

additional print arguments

Details

The call that produced the object x is printed, followed by a three-column matrix with columns Df, %dev and Lambda. The Df column is the number of nonzero coefficients (Df is a reasonable name only for lasso fits). %dev is the percent deviance explained (relative to the null deviance).

Value

The matrix above is silently returned

Author(s)

Jerome Friedman, Trevor Hastie and Rob Tibshirani
Maintainer: Trevor Hastie <hastie@stanford.edu>

References

Friedman, J., Hastie, T. and Tibshirani, R. (2008) Regularization Paths for Generalized Linear Models via Coordinate Descent

See Also

glmnet, predict and coef methods.

Examples

1
2
3
4
x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit1=glmnet(x,y)
print(fit1)

DexGroves/glmnet documentation built on May 6, 2019, 2:12 p.m.