Skip to content

Returns the maximum, se1, and se2 features from a completed feature_select object.

Usage

get_fs_features(x)

Arguments

x

A feature_select class object from a call call to feature_selection().

Value

A list containing:

features_max

Combination of features that gives maximum/minimum mean cost function.

features_1se

Combination of features that has a mean cost function that is one standard error (SE) from the maximum/minimum mean cost function.

features_2se

Combination of features that has a mean cost function that is 1.96*SE from the maximum/minimum mean cost function.

Examples

data  <- wranglr::simdata
feats <- attr(data, "sig_feats")$class
fs <- feature_selection(data, candidate_features = feats,
                        search_type = search_type_forward_model(),
                        model_type  = model_type_lr("class_response"),
                        runs = 2L, folds = 2L)
fs_obj <- Search(fs)
#>  Starting the Feature Selection algorithm ...
#> ── Using `Forward-Stepwise` model search ──────────────────────────────
#>  Step 1 of 5
#>  Step 2 of 5
#>  Step 3 of 5
#>  Step 4 of 5
#>  Step 5 of 5
get_fs_features(fs_obj)
#> ══ Features ═══════════════════════════════════════════════════════════
#>  features_max  5
#>  features_1se  3
#>  features_2se  2
#> 
#> ── features_max ───────────────────────────────────────────────────────
#> 'seq.2802.68', 'seq.9251.29', 'seq.1942.70', 'seq.5751.80', 'seq.9608.12'
#> ── features_1se ───────────────────────────────────────────────────────
#> 'seq.2802.68', 'seq.9251.29', 'seq.1942.70'
#> ── features_2se ───────────────────────────────────────────────────────
#> 'seq.9251.29', 'seq.1942.70'