getFeatures {ExhaustiveSearch}R Documentation

Extract the feature sets from an ExhaustiveSearch object

Description

A simple function to get a vector of feature names for one or more elements of an ExhaustiveSearch object.

Usage

getFeatures(ESResult, ranks)

Arguments

ESResult

a result object from an exhaustive search.

ranks

a numeric value or vector defining which elements should be returned.

Value

If ranks is a single value, a vector of feature names is returned. If an intercept is included, the first element of this vector is "1". If ranks includes multiple values, a list of such vectors is returned.

Author(s)

Rudolf Jagdhuber

See Also

ExhaustiveSearch()

Examples

## Exhaustive search on the mtcars data
data(mtcars)
ES <- ExhaustiveSearch(mpg ~ ., data = mtcars, family = "gaussian")

## Get the feature combinations of the top 3 models
getFeatures(ES, 1:3)

## Get the feature combination of the 531th best model
getFeatures(ES, 531)


[Package ExhaustiveSearch version 1.0.1 Index]