Learn R Programming

msgl (version 2.3.9)

nmod.msgl: Number of models used for fitting

Description

Returns the number of models used for fitting. Note that cv and subsampling objects does not containing any models even though nmod returns a positive number.

Usage

# S3 method for msgl
nmod(object, ...)

Arguments

object

a msgl object

...

not used

Value

the number of models in object

Examples

Run this code
# NOT RUN {
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 number of models
nmod(fit)

# }

Run the code above in your browser using DataLab