# flexBART: Flexible Bayesian regression trees with categorical predictors

arXiv: https://arxiv.org/abs/2211.04459 · HTML: https://mlsanity.com/paper/2211.04459/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 6 of its 26 references that are in the map.
- First posted on arXiv 8 Nov 2022.

## Builds on (most cited first, 6 of 6)

- [ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R](https://mlsanity.com/paper/1508.04409/) (2015)
- [Hierarchical community detection by recursive partitioning](https://mlsanity.com/paper/1810.01509/) (2018)
- [A Mixing Time Lower Bound for a Simplified Version of BART](https://mlsanity.com/paper/2210.09352/) (2022)
- [Dimension-free Mixing for High-dimensional Bayesian Variable Selection](https://mlsanity.com/paper/2105.05719/) (2021)
- [Spatial Modeling of Trends in Crime over Time in Philadelphia](https://mlsanity.com/paper/1901.08117/) (2019)
- [Crime in Philadelphia: Bayesian Clustering with Particle Optimization](https://mlsanity.com/paper/1912.00111/) (2019)

## Built on by (most cited first, 3 of 3)

- [Oblique Bayesian additive regression trees](https://mlsanity.com/paper/2411.08849/) (2024)
- [Weighted Sum-of-Trees Model for Clustered Data](https://mlsanity.com/paper/2602.02931/) (2026)
- [Tree-Based Predictive Models for Noisy Input Data](https://mlsanity.com/paper/2603.07409/) (2026)

## Abstract (arXiv)

Most implementations of Bayesian additive regression trees (BART) one-hot encode categorical predictors, replacing each one with several binary indicators, one for every level or category. Regression trees built with these indicators partition the discrete set of categorical levels by repeatedly removing one level at a time. Unfortunately, the vast majority of partitions cannot be built with this strategy, severely limiting BART's ability to partially pool data across groups of levels. Motivated by analyses of baseball data and neighborhood-level crime dynamics, we overcame this limitation by re-implementing BART with regression trees that can assign multiple levels to both branches of a decision tree node. To model spatial data aggregated into small regions, we further proposed a new decision rule prior that creates spatially contiguous regions by deleting a random edge from a random spanning tree of a suitably defined network. Our re-implementation, which is available in the flexBART package, often yields improved out-of-sample predictive performance and scales better to larger datasets than existing implementations of BART.
