Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print.cv.glmnet

print a cross-validated glmnet object


Description

Print a summary of the results of cross-validation for a glmnet model.

Usage

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

Arguments

x

fitted 'cv.glmnet' object

digits

significant digits in printout

...

additional print arguments

Details

A summary of the cross-validated fit is produced, slightly different for a 'cv.relaxed' object than for a 'cv.glmnet' object. Note that a 'cv.relaxed' object inherits from class 'cv.glmnet', so by directly invoking print.cv.glmnet(object) will print the summary as if relax=TRUE had not been used.

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
https://arxiv.org/abs/1707.08692
Hastie, T., Tibshirani, Robert, Tibshirani, Ryan (2019) Extended Comparisons of Best Subset Selection, Forward Stepwise Selection, and the Lasso

See Also

glmnet, predict and coef methods.

Examples

x = matrix(rnorm(100 * 20), 100, 20)
y = rnorm(100)
fit1 = cv.glmnet(x, y)
print(fit1)
fit1r = cv.glmnet(x, y, relax = TRUE)
print(fit1r)
## print.cv.glmnet(fit1r)  ## CHECK WITH TREVOR

glmnet

Lasso and Elastic-Net Regularized Generalized Linear Models

v4.1-1
GPL-2
Authors
Jerome Friedman [aut], Trevor Hastie [aut, cre], Rob Tibshirani [aut], Balasubramanian Narasimhan [aut], Kenneth Tay [aut], Noah Simon [aut], Junyang Qian [ctb]
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.