创建树桩 Matlab
关于如何在 Matlab 中创建用于 boosting 的决策树桩有什么想法吗?我的意思是,是否有一些参数可以发送到 classregtree 以确保我最终只有 1 个级别?我尝试过修剪,但并不总是会留下树桩(单剪)。有时我只能得到两次切割(不平衡的树)。
我知道 ClassificationTree.template 和 fitensemble 函数,但我想编写自己的 boosting 算法,以将其与 LDA 或 fitensemble 未提供的其他分类器一起使用。
谢谢
Any idea on how to create a decision tree stump for use with boosting in Matlab? I mean is there some parameter I can send to classregtree to make sure i end up with only 1 level? I tried pruning and it doesn't always give a stump (single cut). Sometimes I was only able to get 2 cuts (unbalanced tree).
I'm aware of the ClassificationTree.template and the fitensemble functions but I want to write my own boosting algorithm to use it with LDA or other classifiers which are not provided by fitensemble.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您可以将
minparent
参数设置为等于您的观察次数。使用虹膜示例数据:不确定,但最终手动编码可能会更快 - 特别是如果您无论如何都要合并其他自定义代码。祝你好运!
I believe you can just set the
minparent
parameter equal to your number of observations. Using the iris example data:Not sure, but it may be quicker to eventually code it manually - especially if you're incorporating other custom code anyway. Good luck!
如果
t1
是您的树,由classregtree
返回,我认为您可以使用以下命令创建决策树桩t2
这是否满足您的需要?
If
t1
is your tree, as returned byclassregtree
, I think you can create a decision stumpt2
with the commandDoes that do what you need?