These parameters are auxiliary to tree-based models that use the "catboost"
engine. They correspond to tuning parameters that would be specified using
set_engine("catboost", ...).
Arguments
- range
A two-element vector holding the defaults for the smallest and largest possible values, respectively. If a transformation is specified, these values should be in the transformed units.
- trans
A
transobject from thescalespackage, such asscales::transform_log10()orscales::transform_reciprocal(). If not provided, the default is used which matches the units used inrange. If no transformation,NULL.- values
A character string of possible values. See
values_grow_policyin examples below.
Details
"catboost" is an available engine in the parsnip extension package bonsai
The parameters are:
l2_leaf_reg(): the L2 regularization coefficient for the leaf values.max_leaves(): the maximum number of terminal nodes in a tree.grow_policy(): the method for growing trees."SymmetricTree"(the default in catboost) splits every node at a given depth using the same condition."Depthwise"grows the tree level-by-level, choosing the best split for each node."Lossguide"grows the tree leaf-by-leaf, splitting the leaf with the best loss improvement.one_hot_max_size(): categorical predictors with this many distinct values or fewer are one-hot encoded. Those with more values are encoded using target statistics.score_randomness(): a multiplier for the amount of Gaussian noise added to the splitting score (zero means no additional noise).
Conditional constraints
Several catboost parameters are only used for specific values of other parameters. Using the dials parameter names:
max_leaves()is only used whengrow_policy()is"Lossguide". catboost will fail with an error for other grow policies.min_n()(min_data_in_leafin catboost) is only used whengrow_policy()is"Depthwise"or"Lossguide". For"SymmetricTree", it is silently ignored.tree_depth()is used for all grow policies, but its effect differs. For"SymmetricTree", each tree has exactly2^tree_depthterminal nodes. For"Lossguide", it is a cap on the depth of any branch whilemax_leaves()controls the tree size. catboost's maximum depth is 16.sample_prop()(subsamplein catboost) cannot be used with Bayesian bootstrapping. Bayesian bootstrapping is catboost's default for multiclass outcomes, so catboost will fail with an error in that case unless a differentbootstrap_typeis set as an engine argument.one_hot_max_size()only affects predictors that are passed to catboost as factors. If categorical predictors are converted to indicator variables beforehand (e.g., with a recipe), it has no effect.mtry_prop()(rsmin catboost) is only supported on the CPU, except for pairwise ranking models.
For more information, see the catboost webpage.
Examples
l2_leaf_reg()
#> L2 Regularization Coefficient (quantitative)
#> Transformer: log-10 [1e-100, Inf]
#> Range (transformed scale): [0, 1]
max_leaves()
#> Maximum Number of Leaves (quantitative)
#> Range: [10, 64]
values_grow_policy
#> [1] "SymmetricTree" "Depthwise" "Lossguide"
grow_policy()
#> Tree Growing Policy (qualitative)
#> 3 possible values include:
#> 'SymmetricTree', 'Depthwise', and 'Lossguide'
one_hot_max_size()
#> Maximum Levels for One-Hot Encoding (quantitative)
#> Range: [1, 25]
score_randomness()
#> Random Noise Level (quantitative)
#> Range: [0, 1.5]
