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

RPartModel

Recursive Partitioning and Regression Tree Models


Description

Fit an rpart model.

Usage

RPartModel(
  minsplit = 20,
  minbucket = round(minsplit/3),
  cp = 0.01,
  maxcompete = 4,
  maxsurrogate = 5,
  usesurrogate = 2,
  xval = 10,
  surrogatestyle = 0,
  maxdepth = 30
)

Arguments

minsplit

minimum number of observations that must exist in a node in order for a split to be attempted.

minbucket

minimum number of observations in any terminal node.

cp

complexity parameter.

maxcompete

number of competitor splits retained in the output.

maxsurrogate

number of surrogate splits retained in the output.

usesurrogate

how to use surrogates in the splitting process.

xval

number of cross-validations.

surrogatestyle

controls the selection of a best surrogate.

maxdepth

maximum depth of any node of the final tree, with the root node counted as depth 0.

Details

Response Types:

factor, numeric, Surv

Automatic Tuning of Grid Parameters:

cp

Further model details can be found in the source link below.

Value

MLModel class object.

See Also

Examples

## Requires prior installation of suggested packages rpart and partykit to run

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

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.