Description Usage Arguments Value Examples
Calculate mean conditional minimal depth with respect to a vector of variables
1 2 3 4 5 6 | min_depth_interactions(
forest,
vars = important_variables(measure_importance(forest)),
mean_sample = "top_trees",
uncond_mean_sample = mean_sample
)
|
forest |
A randomForest object |
vars |
A character vector with variables with respect to which conditional minimal depth will be calculated; by default it is extracted by the important_variables function but this may be time consuming |
mean_sample |
The sample of trees on which conditional mean minimal depth is calculated, possible values are "all_trees", "top_trees", "relevant_trees" |
uncond_mean_sample |
The sample of trees on which unconditional mean minimal depth is calculated, possible values are "all_trees", "top_trees", "relevant_trees" |
A data frame with each observation giving the means of conditional minimal depth and the size of sample for a given interaction
1 2 | forest <- randomForest::randomForest(Species ~ ., data = iris, ntree = 100)
min_depth_interactions(forest, c("Petal.Width", "Petal.Length"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.