runIFE Removes top features identified by ML models and retrains iteratively; returns nMCC at each iteration.

runIFE(
  ml_input_tibble,
  by_num = TRUE,
  by_vi = FALSE,
  percent_removal_vec = 10 * 1:9,
  mix_vec = 0,
  return_feats = FALSE,
  verbose = TRUE
)

Arguments

ml_input_tibble

An ML-ready tibble generated by loadMLInputTibble()

by_num

bool Set to TRUE if removing top features as a percentage of the total number of features.

by_vi

bool Set to TRUE if removing top features by their contribution to the total variable importance.

percent_removal_vec

num A vector of percentages of total top features removed (if by_num = TRUE and by_vi = FALSE) or percent contributions of top features removed to the total variable importance (if by_vi = TRUE and by_num = FALSE) at each iteration. The function will automatically train with all features to start, so there is no need to specify 0 in this vector.

mix_vec

num A vector containing mixture values (0 corresponds to L2 regularization; 1 corresponds to L1; intermediate values correspond to elastic net) to try. The default corresponds to L2 for the purpose of IFE analysis.

return_feats

bool Whether to return top features from each iteration of IFE.

verbose

bool The function will stay quiet if set to FALSE.

Value

A tibble with IFE performance (note: this will be returned within a list along with top features removed per iteration if return_feats = TRUE.)

Examples

data(demo_ml_tibble)
set.seed(1)
runIFE(
  demo_ml_tibble,
  by_num = TRUE, by_vi = FALSE,
  percent_removal_vec = c(25, 50), mix_vec = 0,
  return_feats = TRUE, verbose = FALSE
)
#> Warning: Classes are roughly balanced. Calculation of log2(AUPRC/prior) may be inappropriate.
#> Warning: Classes are roughly balanced. Calculation of log2(AUPRC/prior) may be inappropriate.
#>A | error:   x should be a matrix with 2 or more columns
#> There were issues with some computations   A: x1
#> Warning: All models failed. Run `show_notes(.Last.tune.result)` for more information.
#> There were issues with some computations   A: x1
#>