如何同时调整树木数量和树木数量以进行随机的森林回归?

发布于 2025-01-31 06:10:02 字数 261 浏览 6 评论 0原文

我正在尝试使用caret和方法Ranger来调整随机森林的参数。我已经看到了使用Tunegrid来调整mtry的代码。然后使用结果mtry运行循环并调整树的数量(num.tree)。但是,我想知道是否可以同时调整它们,以找出所有可能组合之间的最佳模型。我不想保持一个论点不变并调整另一个论点,而是同时调整一个论点。有什么办法吗?

I am trying to tune parameters for a Random Forest using caret and method ranger. I have seen codes for tuning mtry using tuneGrid. And then using the resulted mtry to run loops and tune the number of trees (num.tree). However, I would like to know if it is possible to tune them both at the same time, to find out the best model between all possible combinations. I do not want to keep one argument constant and tune the other one, but both at the same time. Is there any way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜柠檬 2025-02-07 06:10:02

作为tunegrid的一部分,您无法调整ntree caret; tunegrid;仅mtrysplitrulemin.node.size - 请参阅每个型号类型的调谐参数:
https://topepepo.github.io/caret/caret/caret/caret/caret/available-models.html.html

ntree只能在Train中指定。

You cannot tune ntree as part of a tuneGrid for Random Forest in caret; only mtry, splitrule and min.node.size - see the tuning parameters for each model type here:
https://topepo.github.io/caret/available-models.html

ntree can only be specified in train.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文