stochtree is a C++ library for Bayesian tree ensemble models such as BART and Bayesian Causal Forests (BCF), as well as user-specified variations. Unlike previous BART packages, stochtree provides bindings to both R and Python for full interoperability. stochtree boasts a more comprehensive range of models relative to previous packages, including heteroskedastic forests, random effects, and treed linear models. Additionally, stochtree offers flexible handling of model fits: the ability to save model fits, reinitialize models from existing fits (facilitating improved model initialization heuristics), and pass fits between R and Python. On both platforms, stochtree exposes lower-level functionality, allowing users to specify models incorporating Bayesian tree ensembles without needing to modify C++ code. We illustrate the use of stochtree in three settings: i) straightfoward applications of existing models such as BART and BCF, ii) models that include more sophisticated components like heteroskedasticity and leaf-wise regression models, and iii) as a component of custom MCMC routines to fit nonstandard tree ensemble models.
翻译:stochtree是一个用于贝叶斯树集成模型(如BART和贝叶斯因果森林(BCF))以及用户自定义变体的C++库。与以往的BART软件包不同,stochtree同时提供R和Python的接口绑定,实现了完全的互操作性。相较于先前软件包,stochtree提供了更全面的模型范围,包括异方差森林、随机效应以及树状线性模型。此外,stochtree支持灵活的模型拟合处理:能够保存模型拟合结果、从现有拟合重新初始化模型(便于改进模型初始化启发式算法),以及在R和Python之间传递拟合结果。在两个平台上,stochtree均开放了底层功能接口,使用户能够在不修改C++代码的情况下构建包含贝叶斯树集成的模型。我们通过三种场景展示stochtree的应用:i) 现有模型(如BART和BCF)的直接应用,ii) 包含异方差性和叶节点回归模型等复杂组件的模型,iii) 作为自定义MCMC流程的组成部分以拟合非标准树集成模型。