get_measure | R Documentation |
spar
' or 'spar.cv
' objectExtractor for (cross-)validation measure from 'spar
' or 'spar.cv
' object
get_measure(object)
object |
A fitted ' |
data.frame containing the (cross-)validation measure for the considered threshold and number of model combinations.
For 'spar
' objects it contains information about the measure calculated on the validation set (or on the training sample if
xval and yval are missing) and the number of active variables. For 'spar.cv
' objects it contains information
on the average measure obtained across folds together with the standard deviation across the folds and the average number of active variables.
the nfolds
of the training set.
spar, spar.cv, get_model
example_data <- simulate_spareg_data(n = 100, p = 400, ntest = 100)
spar_res <- spar(example_data$x, example_data$y, xval = example_data$xtest,
yval = example_data$ytest, nummods=c(5, 10, 15, 20, 25, 30))
get_measure(spar_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.