Skip to contents

Builds 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.

Usage

ci_tree_control_grid(
  minsplit = c(50L, 100L, 200L),
  minbucket = c(20L, 50L, 100L),
  minprob = c(0.01),
  maxdepth = c(2L, 3L, 4L),
  min_gain = 0,
  min_relative_gain = 0,
  mtry = NULL,
  ntree = NULL
)

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 NULL to search all candidate variables.

ntree

Optional candidate numbers of trees for forest tuning.

Value

A data.table with one row per candidate control setting.

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