TreeModel {MachineShop} | R Documentation |
Classification and Regression Tree Models
Description
A tree is grown by binary recursive partitioning using the response in the specified formula and choosing splits from the terms of the right-hand-side.
Usage
TreeModel(
mincut = 5,
minsize = 10,
mindev = 0.01,
split = c("deviance", "gini"),
k = numeric(),
best = integer(),
method = c("deviance", "misclass")
)
Arguments
mincut |
minimum number of observations to include in either child node. |
minsize |
smallest allowed node size: a weighted quantity. |
mindev |
within-node deviance must be at least this times that of the root node for the node to be split. |
split |
splitting criterion to use. |
k |
scalar cost-complexity parameter defining a subtree to return. |
best |
integer alternative to |
method |
character string denoting the measure of node heterogeneity used to guide cost-complexity pruning. |
Details
- Response types:
factor
,numeric
Further model details can be found in the source link below.
Value
MLModel
class object.
See Also
tree
, prune.tree
,
fit
, resample
Examples
## Requires prior installation of suggested package tree to run
fit(Species ~ ., data = iris, model = TreeModel)