Create a tuning grid for greedy concentration-index trees and forests
Source:R/predict_ci_tree_terminal_mean.R
ci_tree_control_grid.RdBuilds a grid of candidate controls for ci_tree() and ci_forest(). The grid
is designed for the fully greedy tree builder, so it tunes tree-size and
split-search controls rather than conditional-inference test controls such
as alpha or mincriterion.
Arguments
- minsplit
Candidate minimum weighted parent-node sizes.
- minbucket
Candidate minimum weighted child-node sizes.
- minprob
Candidate minimum child-node weight proportions.
- maxdepth
Candidate maximum tree depths.
- min_gain
Candidate minimum concentration-index gains required for a split.
- min_relative_gain
Local split-stopping thresholds: candidate minimum concentration-index gains as a share of parent-node impurity required for a split.
- mtry
Optional candidate numbers of variables sampled at each node. Use
NULLto search all candidate variables.- ntree
Optional candidate numbers of trees for forest tuning.
Examples
ci_tree_control_grid(
minsplit = c(20, 50),
minbucket = c(5, 10),
maxdepth = 2:3
)
#> minsplit minbucket minprob maxdepth min_gain min_relative_gain
#> <int> <int> <num> <int> <num> <num>
#> 1: 20 5 0.01 2 0 0
#> 2: 50 5 0.01 2 0 0
#> 3: 20 10 0.01 2 0 0
#> 4: 50 10 0.01 2 0 0
#> 5: 20 5 0.01 3 0 0
#> 6: 50 5 0.01 3 0 0
#> 7: 20 10 0.01 3 0 0
#> 8: 50 10 0.01 3 0 0