Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 rpart 构建决策树分类器。我希望根据与子树对应的叶节点的某些参数使用我自己的修剪功能。为此,我认为我需要遍历树。我探索了 rpart 的文档,但想不出办法。请帮忙。
看看我在从 ctree 对象中提取预测变量时的树遍历代码
潜在地,这将是有用的。