简体   繁体   English

是否可以使用基于模型的树(即 partykit 包中的“mob()”)构建随机森林

[英]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.

相关问题 将 mob() 树(partykit 包)与 nls() 模型一起使用 - Using mob() trees (partykit package) with nls() model 使用 mob() 树(partykit 包)和logistic() model - Using mob() trees (partykit package) with logistic() model R:Tidymodels:是否可以在整洁的模型中使用 plot 随机森林 model 的树木? - R: Tidymodels: Is it possible to plot the trees for a random forest model in tidy models? 是否可以在带有 model 的 partykit::mob() 中建立拆分标准,然后将不同的 model 拟合到终端节点? - Is it possible to establish splitting criteria in partykit::mob() with a model and then fit a different model to terminal nodes? 如何在MOB树的每个节点中找到观测值? (partykit软件包) - How to find the observation in each node of the MOB tree? (partykit package) 在聚类协方差测试中指定更复杂的随机效应结构(在基于 model 的递归分区中)? (例如,MOB、glmertree 等) - Specifying more complex random effects structure in cluster covariance tests (in model based recursive partitioning)? (e.g., MOB, glmertree, etc.) 使用partykit创建随机森林时,如何获得变量的重要性? - How can I get the variable importance when creating a random forest with partykit? Tidymodel 包:R 中的通用线性模型 (glm) 和决策树(袋装树、提升树和随机森林)模型 - Tidymodel Package: General linear models (glm) and decision tree (bagged trees, boosted trees, and random forest) models in R 如何在 R 中向随机森林添加更多树 - How can I add more trees to a random forest in R 无法获得partykit包的mob函数来进行单变量MLE拟合 - Can't get partykit package's mob function to do univariate MLE fit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM