Is rpart automatic pruning?

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.


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.

链接地址: http://www.djcxy.com/p/65500.html

上一篇: 计算矩形内最大旋转矩形的点和维数

下一篇: rpart是否自动修剪?