View source: R/estimate_risk.R
| estimate_risk | R Documentation |
This function uses the degrees of freedom to calculate various information criteria. This function uses the "unknown variance" version of the likelihood. Only implemented for Gaussian regression. The constant is ignored (as in [stats::extractAIC()]).
estimate_risk(object, x, type = c("AIC", "BIC", "GCV"), approx_df = FALSE)
object |
fitted object from a call to [sparsegl()]. |
x |
Matrix. The matrix of predictors used to estimate the 'sparsegl' object. May be missing if 'approx_df = TRUE'. |
type |
one or more of AIC, BIC, or GCV. |
approx_df |
the 'df' component of a 'sparsegl' object is an approximation (albeit a fairly accurate one) to the actual degrees-of-freedom. However, the exact value requires inverting a portion of ‘X’X'. So this computation may take some time (the default computes the exact df). |
a 'data.frame' with as many rows as 'object$lambda'. It contains columns 'lambda', 'df', and the requested risk types.
Vaiter S, Deledalle C, Peyré G, Fadili J, Dossal C. (2012). The Degrees of Freedom of the Group Lasso for a General Design. https://arxiv.org/pdf/1212.6478.pdf.
[sparsegl()] method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.