ranking | R Documentation |
Extracts the predictor ranking(s) from an object of class vsel
(returned
by varsel()
or cv_varsel()
). A predictor ranking is simply a character
vector of predictor terms ranked by predictive relevance (with the most
relevant term first). In any case, objects of class vsel
contain the
predictor ranking based on the full-data search. If an object of class
vsel
is based on a cross-validation (CV) with fold-wise searches (i.e., if
it was created by cv_varsel()
with validate_search = TRUE
), then it also
contains fold-wise predictor rankings.
ranking(object, ...)
## S3 method for class 'vsel'
ranking(object, nterms_max = NULL, ...)
object |
The object from which to retrieve the predictor ranking(s). Possible classes may be inferred from the names of the corresponding methods (see also the description). |
... |
Currently ignored. |
nterms_max |
Maximum submodel size (number of predictor terms) for the
predictor ranking(s), i.e., the submodel size at which to cut off the
predictor ranking(s). Using |
An object of class ranking
which is a list
with the following
elements:
fulldata
: The predictor ranking from the full-data search.
foldwise
: The predictor rankings from the fold-wise
searches in the form of a character matrix (only available if object
is
based on a CV with fold-wise searches, otherwise element foldwise
is
NULL
). The rows of this matrix correspond to the CV folds and the columns
to the submodel sizes. Each row contains the predictor ranking from the
search of that CV fold.
cv_proportions()
# For an example, see `?plot.cv_proportions`.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.