Description Usage Arguments Value Author(s) Examples
Extracts the nonzero parameters for each model.
1 2 | ## S3 method for class 'msgl'
parameters(object, ...)
|
object |
a msgl object |
... |
ignored |
a list of length nmod(x)
containing the nonzero parameters of the models.
Martin Vincent
1 2 3 4 5 6 7 8 9 10 11 | 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 parameters of model 1, 10 and 25
parameters(fit)[c(1,10,25)]
# count the number of nonzero parameters in each model
sapply(parameters(fit), sum)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.