Is rpart automatic pruning?

2019-06-17 19:03发布

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.

标签: r pruning rpart
1条回答
狗以群分
2楼-- · 2019-06-17 19:22

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.

查看更多
登录 后发表回答