Learn R Programming

MachineShop (version 3.8.0)

TreeModel: 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")
)

Value

MLModel class object.

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 k requesting the number of terminal nodes of a subtree in the cost-complexity sequence to return.

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.

See Also

tree, prune.tree, fit, resample

Examples

Run this code
# \donttest{
## Requires prior installation of suggested package tree to run

fit(Species ~ ., data = iris, model = TreeModel)
# }

Run the code above in your browser using DataLab