Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 = NULL,
  best = NULL,
  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 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.

Value

MLModel class object.

See Also

Examples

## Requires prior installation of suggested package tree to run

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

MachineShop

Machine Learning Models and Tools

v2.8.0
GPL-3
Authors
Brian J Smith [aut, cre]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.