[英]Is it possible to build a random forest with model based trees i.e., `mob()` in partykit package
I'm trying to build a random forest using model based regression trees in partykit package.我正在尝试使用 partykit 包中基于模型的回归树来构建随机森林。 I have built a model based tree using mob()
function with a user defined fit()
function which returns an object at the terminal node.我使用mob()
函数和用户定义的fit()
函数构建了一个基于模型的树,该函数在终端节点返回一个对象。
In partykit there is cforest()
which uses only ctree()
type trees.在 partykit 中有cforest()
只使用ctree()
类型的树。 I want to know if it is possible to modify cforest()
or write a new function which builds random forests from model based trees which returns objects at the terminal node.我想知道是否可以修改cforest()
或编写一个新函数,该函数从基于模型的树构建随机森林,并在终端节点返回对象。 I want to use the objects in the terminal node for predictions.我想使用终端节点中的对象进行预测。 Any help is much appreciated.任何帮助深表感谢。 Thank you in advance.先感谢您。
Edit: The tree I have built is similar to the one here -> https://stackoverflow.com/a/37059827/14168775编辑:我构建的树类似于这里的树-> https://stackoverflow.com/a/37059827/14168775
How do I build a random forest using a tree similar to the one in above answer?如何使用类似于上述答案中的树来构建随机森林?
At the moment, there is no canned solution for general model-based forests using mob()
although most of the building blocks are available.目前,虽然大多数构建块都可用,但对于使用mob()
的基于模型的一般森林没有罐头解决方案。 However, we are currently reimplementing the backend of mob()
so that we can leverage the infrastructure underlying cforest()
more easily.但是,我们目前正在重新实现mob()
的后端,以便我们可以更轻松地利用cforest()
底层的基础设施。 Also, mob()
is quite a bit slower than ctree()
which is somewhat inconvenient in learning forests.此外, mob()
比ctree()
慢很多,这在学习森林中有点不方便。
The best alternative, currently, is to use cforest()
with a custom ytrafo
.目前,最好的选择是将cforest()
与自定义ytrafo
。 These can also accomodate model-based transformations, very much like the scores in mob()
.这些也可以适应基于模型的转换,非常像mob()
的分数。 In fact, in many situations ctree()
and mob()
yield very similar results when provided with the same score function as the transformation.事实上,在许多情况下,当提供与转换相同的评分函数时, ctree()
和mob()
产生非常相似的结果。
A worked example is available in this conference presentation:本次会议演示中提供了一个工作示例:
Heidi Seibold, Achim Zeileis, Torsten Hothorn (2017).海蒂·塞博尔德、Achim Zeileis、Torsten Hothorn (2017)。 "Individual Treatment Effect Prediction Using Model-Based Random Forests." “使用基于模型的随机森林进行个体治疗效果预测。” Presented at Workshop "Psychoco 2017 - International Workshop on Psychometric Computing", WU Wirtschaftsuniversität Wien, Austria.在奥地利维也纳 WU Wirtschaftsuniversität 研讨会“Psychoco 2017 - 心理测量计算国际研讨会”上发表。 URL https://eeecon.uibk.ac.at/~zeileis/papers/Psychoco-2017.pdf网址https://eeecon.uibk.ac.at/~zeileis/papers/Psychoco-2017.pdf
The special case of model-based random forests for individual treatment effect prediction was also implemented in a dedicated package model4you
that uses the approach from the presentation above and is available from CRAN.用于个体治疗效果预测的基于模型的随机森林的特殊情况也在专用包model4you
中实现,该包使用上述演示中的方法,可从 CRAN 获得。 See also:也可以看看:
Heidi Seibold, Achim Zeileis, Torsten Hothorn (2019).海蒂·塞博尔德、Achim Zeileis、Torsten Hothorn (2019)。 "
model4you
: An R Package for Personalised Treatment Effect Estimation." “model4you
:个性化治疗效果估计的 R 包。” Journal of Open Research Software , 7 (17), 1-6.开放研究软件杂志, 7 (17),1-6。 doi:10.5334/jors.219 doi:10.5334/jors.219
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.