coef.msgl | R Documentation |
This function returns the nonzero coefficients (that is the nonzero entries of the beta
matrices)
## S3 method for class 'msgl'
coef(object, index = 1:nmod(object), ...)
object |
a msgl object |
index |
indices of the models |
... |
ignored |
a list of length length(index)
with nonzero coefficients of the models
Martin Vincent
data(SimData)
lambda <- msgl::lambda(x, classes, alpha = .5, d = 50, lambda.min = 0.05)
fit <- msgl::fit(x, classes, alpha = .5, lambda = lambda)
# the nonzero coefficients of the models 1, 10 and 20
coef(fit, index = c(1,10,20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.