coef.glinternet {glinternet} | R Documentation |
Returns the actual main effect and interaction coefficients that satisfy the sum constraints in a linear interaction model. See the paper below for details.
## S3 method for class 'glinternet' coef(object, lambdaIndex = NULL, ...)
object |
Fitted |
lambdaIndex |
Index of |
... |
Not used. |
Returns the actual main effect and interaction coefficients. These satisfy the sum constraints in the original linear interaction model.
A list of length lambda
if lambdaIndex
is not
provided. Otherwise, of length lambdaIndex
. Each component (for
each lambda) is
itself a list, with components
mainEffects |
A list with components |
mainEffectsCoef |
List of coefficients for the main effects in
|
interactions |
List of interactions, with components
|
interactionsCoef |
List of interaction coefficients for
|
Michael Lim and Trevor Hastie
Maintainer: Michael Lim michael626@gmail.com
"Learning interactions via hierarchical group-lasso regularization"
glinternet.cv
, predict.glinternet
,
predict.glinternet.cv
, plot.glinternet.cv
, glinternet
Y = rnorm(100) X = matrix(rnorm(100*10), nrow=100) numLevels = rep(1, 10) fit = glinternet(X, Y, numLevels) coeffs = coef(fit)