Is rpart automatic pruning?

pruning, r, rpart

Solution

No, but the defaults for the fitting function may stop splitting "early" (for some definition of "early").

See `?rpart.control` for the parameters you can tweak. In particular, see the argument `minsplit` and `minbucket` in that help file. These are stopping rules that will prevent any node being split if those conditions are not met.

You will most likely need to prune the tree back using `prune()` to some optimal value of the cost-complexity parameter.

Problem

Is rpart automatic pruning? The decision tree produced by rpart is much more levels than that produced by Oracle Data Mining which has the automatic pruning.

Original source