View source: R/01_S7_Hyperparameters.R
setup_CART | R Documentation |
Setup hyperparameters for CART training.
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
)
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. |
Get more information from rpart::rpart and rpart::rpart.control.
CARTHyperparameters object.
EDG
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.