Setup hyperparameters for CART training.
Usage
setup_CART(
cp = 0.01,
maxdepth = 20L,
minsplit = 2L,
minbucket = 1L,
prune_cp = NULL,
method = "auto",
model = TRUE,
maxcompete = 4L,
maxsurrogate = 5L,
usesurrogate = 2L,
surrogatestyle = 0L,
xval = 0L,
cost = NULL,
ifw = FALSE
)
Arguments
- cp
(Tunable) Numeric: Complexity parameter.
- maxdepth
(Tunable) Integer: Maximum depth of tree.
- minsplit
(Tunable) Integer: Minimum number of observations in a node to split.
- minbucket
(Tunable) Integer: Minimum number of observations in a terminal node.
- prune_cp
(Tunable) Numeric: Complexity for cost-complexity pruning after tree is built
- method
String: Splitting method.
- model
Logical: If TRUE, return a model.
- maxcompete
Integer: Maximum number of competitive splits.
- maxsurrogate
Integer: Maximum number of surrogate splits.
- usesurrogate
Integer: Number of surrogate splits to use.
- surrogatestyle
Integer: Type of surrogate splits.
- xval
Integer: Number of cross-validation folds.
- cost
Numeric (>=0): One for each feature.
- ifw
Logical: If TRUE, use Inverse Frequency Weighting in classification.
Details
Get more information from rpart::rpart and rpart::rpart.control.