Scope
stat_random_forest() is currently based on the {randomForestSRC} package.
The {ranger} package is more commonly used than {randomForestSRC},
has arguably more sensible defaults (e.g. for importance measure),
can handle all three endpoint types and is fast
(C++ implementation).
- Implement new function(s) for
{ranger}-based modelling
- Importance measure: permutation importance provided by
{ranger}
- Write tests in analogy to
stat_random_forest()
Details
The following description of individual components follows the current
structure in the package.
stat_ranger <- function(X, X_k, y, type = "regression", ...) { ... }
- input as for existing
stat_* functions, with
... to pass further arguments for importance score calculation
(can apply to modelling or importance, resp.)
- output: data frame/tibble, exactly one column named
W,
one row per predictor, rownames equal to colnames(X)
ranger_importance_scores() called within stat_ranger() to
fit random forest and compute/extract individual importances for
knockoff and original variables
Known issues
- in rare cases,
ranger may return NaN for variable importance.
We have seen this in our initial custom implementation of stat_ranger()
and need to come up with an efficient solution.
Questions
- random forest options:
- keep
stat_random_forest() with {randomforestSRC} and add stat_ranger()?
- deprecate
{randomforestSRC}?
- keep
stat_random_forest() and add engine argument to select between "randomforestSRC" and "ranger"?
Related tasks
- update
knockoff.statistics() documentation
- parallelization framework
Scope
stat_random_forest()is currently based on the{randomForestSRC}package.The
{ranger}package is more commonly used than{randomForestSRC},has arguably more sensible defaults (e.g. for importance measure),
can handle all three endpoint types and is fast
(C++ implementation).
{ranger}-based modelling{ranger}stat_random_forest()Details
The following description of individual components follows the current
structure in the package.
stat_ranger <- function(X, X_k, y, type = "regression", ...) { ... }stat_*functions, with...to pass further arguments for importance score calculation(can apply to modelling or importance, resp.)
W,one row per predictor,
rownamesequal tocolnames(X)ranger_importance_scores()called withinstat_ranger()tofit random forest and compute/extract individual importances for
knockoff and original variables
Known issues
rangermay returnNaNfor variable importance.We have seen this in our initial custom implementation of
stat_ranger()and need to come up with an efficient solution.
Questions
stat_random_forest()with{randomforestSRC}and addstat_ranger()?{randomforestSRC}?stat_random_forest()and addengineargument to select between"randomforestSRC"and"ranger"?Related tasks
knockoff.statistics()documentation