在 CART 中选择 cp、minsplit 和 maxdepth 的值

发布于 2025-01-16 06:08:26 字数 432 浏览 3 评论 0原文

因此,我试图弄清楚如何找到我的问题的 cp、min split 和 maxdepth 值。我发现一篇文章(这里是链接:https://uc-r.github.io/regression_trees )显示了网格搜索方法。我不明白他们如何选择 minsplit 和 maxdepth 值的范围。我应该采取与他们相同的范围吗?他们是这样进行的:

hyper_grid <- expand.grid(
  minsplit = seq(5, 20, 1),
  maxdepth = seq(8, 15, 1)
)

他们在什么基础上选择 5-20 的 minsplit 和 8-15 的 max深度?

提前致谢!

So, I am trying to figure out how to find the cp, min split, and maxdepth values for my problem. I came across an article (here is the link: https://uc-r.github.io/regression_trees) that shows the grid search approach. I don't understand though that how do they choose the range of minsplit and maxdepth values. Should I take the same range as them? This is how they proceed:

hyper_grid <- expand.grid(
  minsplit = seq(5, 20, 1),
  maxdepth = seq(8, 15, 1)
)

On what basis do they choose 5-20 for minsplit and 8-15 for maxdepth?

Thanks in advance!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文