View source: R/create_rank_table.R
create_rank_table | R Documentation |
Create Table of Variable Importance Rankings for VADIS analysis
create_rank_table(mod_list, conditional = TRUE)
mod_list |
A list of random forest model objects. Currently supports objects of class |
conditional |
logical. Should conditional (default) or unconditional permutation variable importance be computed. Only applies to |
path |
Path in which to save the output (as |
The function loops through a list of random forest objects, extracts the variable importance estimates, and compiles them in a single dataframe. For RandomForest-class
models, function uses the permimp
function (Debeer & Strobl 2020) with the default threshold (0.95) and AUC= TRUE
(Janitza et al. 2013).
For forests fit with ranger
or randomForest
, the importance
argument must be specified.
#'
A dataframe
Jason Grafmiller
Debeer, Dries & Carolin Strobl. 2020. Conditional permutation importance revisited. *BMC Bioinformatics* 21(1). 307. https://doi.org/10.1186/s12859-020-03622-2.
Janitza, Silke, Carolin Strobl & Anne-Laure Boulesteix. 2013. An AUC-based permutation variable importance measure for random forests. *BMC Bioinformatics* 14(1). 119. https://doi.org/10.1186/1471-2105-14-119.
## Not run:
fmla <- Type ~ PossrAnimacyBin + PossrWordC + PossmWordC + FinalSibilant +
TypeTokenRatio + ProtoSemanticRelation + PossrExpType
rf_fnc <- function(x) ranger::ranger(fmla, data = x, importance = "permutation")
rf_list <- lapply(data_list, rf_func)
create_rank_table(rf_list, path = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.