Is rpart automatic pruning?

孤街浪徒 提交于 2019-12-12 10:44:44

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/13136683/is-rpart-automatic-pruning

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!