- Introduced by
- Chipman, H. A.; George, E. I.; McCulloch, R. E.
- Year
- 1998
- Type
- Bayesian ensemble / tree model
- Family
- Machine learning
What does it do?
Bayesian Decision Tree (Bayesian CART) places a prior distribution over tree structures and leaf parameters, then uses Markov chain Monte Carlo to sample trees from their posterior distribution given the data.
Predictions are averaged over the sampled trees, so the output is a posterior predictive distribution with credible intervals rather than a single fitted tree.
The intuition behind the method
A standard decision tree fits one structure to the data and reports its prediction as if that structure were certain. A Bayesian decision tree recognises that several different structures may fit the data about equally well. The prior expresses which structures are plausible, for example by penalising deeper trees, and MCMC samples trees in proportion to their posterior probability. Predictions are averaged over these trees, so the spread of predictions reflects uncertainty about the structure as well as noise in the data.
History
Bayesian CART model search was formalised by Chipman, George, and McCulloch (1998), who used a prior to guide a stochastic search over CART models, with models selectable by posterior probability or other criteria. In the same year, Denison, Mallick, and Smith (1998) proposed a related Bayesian CART algorithm. The sum-of-trees extension BART (2010) is a later development that is discussed in the FAQ below.
When to use it
Choose Bayesian Decision Tree when a single predicted value is not enough and you need to know how uncertain the model is about its structure, for example in risk-sensitive settings such as medicine, policy, or finance. It suits tabular data with a modest number of observations, where structural uncertainty is large and the individual trees must stay readable. As a rough indication, feasibility becomes a concern for sample sizes on the order of 10 000 observations or more, because MCMC over tree structures becomes computationally demanding. Feasibility depends mainly on the number of features, the maximum tree depth allowed, and the number of MCMC iterations, so this figure is not a firm cut-off. For very large datasets, a forest or gradient boosting model is usually more practical. The method is also a poor first choice when predictive accuracy on a benchmark is the only goal, since ensemble methods such as Random Forest or gradient boosting are usually preferred for that purpose.
Limitations and considerations
- Sampling over tree space is computationally expensive; for datasets on the order of 10 000 observations or more, exact MCMC becomes impractical without approximations.
- Results depend on the structure prior, and its depth-penalty parameters require domain judgement and a sensitivity check.
- Convergence of the Markov chain is hard to confirm and typically requires long runs with burn-in and thinning.
- The standard specification assumes complete data and does not handle missing values natively.
- Fewer standard machine-learning libraries implement it than CART or Random Forest, which raises the implementation effort.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The output is a posterior predictive distribution, so each prediction comes with credible intervals that reflect uncertainty about the tree structure.
- The structure prior penalises deep trees, so complexity is controlled through the prior rather than by a separate pruning step.
- Individual sampled trees are ordinary decision trees and can be inspected node by node.
- Averaging over many sampled structures avoids committing to the single split sequence that a greedy fit would select.
- Conjugate leaf priors allow leaf values to be integrated out analytically, which reduces the state the sampler has to explore.
Applications
- Small-sample classification or regression, where a single greedy tree may be unstable and the posterior spread shows how much the structure could change.
- Medical or policy decision support in which the decision-maker needs predictive intervals and readable splits, not only a point prediction.
- Variable-importance and feature-selection analysis that examines how consistently variables appear across sampled trees.
- Risk scoring in finance or insurance, where a probabilistic measure of uncertainty supports decisions alongside the point prediction.
- As a building block in BART, a sum-of-trees model used for regression and causal inference.
How it works
How it works
The prior is placed on the tree structure and on the leaf parameters, such as leaf means or class probabilities. The structure prior sets how likely a node at a given depth is to be split, which penalises deep trees without ruling them out; its functional form and typical parameter settings are discussed in the FAQ below. Leaf priors are chosen to be conjugate to the likelihood, so leaf values can be integrated out analytically.
The space of tree structures is explored by a Markov chain whose moves grow, prune, change, or swap nodes of the current tree. Each proposed structure is evaluated against the prior and the observed data. Because leaf parameters can be integrated out, only the structure needs to be sampled explicitly.
Each candidate structure is scored through the joint posterior in the formula above, p(T, Θ | y) ∝ p(y | T, Θ) p(Θ | T) p(T). When the leaf parameters are integrated out under their conjugate priors, the score depends on the structure T alone, and this is the quantity the chain uses to accept or reject a proposal.
Formula
p(T, \Theta \mid y) \propto p(y \mid T, \Theta)\, p(\Theta \mid T)\, p(T)
A Metropolis–Hastings or reversible-jump scheme runs for many iterations and retains tree structures in proportion to their posterior probability. Early iterations are discarded as burn-in, and the retained trees form a posterior sample of plausible structures for the data. In practice, run several independent chains from different starting trees and inspect the traces of the log posterior and tree depth across iterations. Choose the burn-in length and thinning interval from these traces rather than fixing them in advance. If chains disagree in their posterior summaries, the sampler has not mixed and the results should not be reported.
For a new observation, each retained tree gives a prediction, and these are averaged with posterior weights to give a posterior predictive mean. The spread of predictions across trees yields credible intervals that reflect uncertainty about the tree structure, not only noise around one fixed tree.
Formula
\hat{y} = \mathbb{E}[y \mid x, \text{data}] = \int p(y \mid x, T, \Theta)\, p(T, \Theta \mid \text{data})\, d(T,\Theta)Common pitfalls
- Stopping the chain before it has mixed, then reporting the retained trees as a representative posterior sample.
- Choosing a structure prior that barely penalises depth, which lets the sampler favour deep trees and overfit small samples much as greedy CART does.
- Keeping early, unconverged iterations in the posterior average.
- Reading posterior predictive intervals as frequentist confidence intervals; they are meaningful only under the chosen prior and likelihood.
- Judging the method by point-prediction accuracy against Random Forest alone and ignoring the uncertainty output it is designed to provide.
Frequently asked questions
How does Bayesian Decision Tree differ from Random Forest?
Random Forest grows many trees on bootstrap resamples with random feature subsets and averages them to reduce variance. Bayesian Decision Tree instead samples trees from a posterior defined by a prior and the likelihood, and its intervals come from that posterior. Random Forest is much cheaper to fit on large datasets, whereas Bayesian Decision Tree is better suited to small data where structural uncertainty matters.
What prior should I use on the tree structure?
A commonly used form in the Bayesian CART literature sets the probability that a node at depth d is internal to alpha * (1 + d)^(-beta), where alpha and beta are user-chosen parameters. This penalises deep trees without ruling them out, and a larger beta favours shallower trees. Values of alpha = 0.95 and beta = 2 appear as typical settings in later BART work; they should not be assumed to be the defaults of the 1998 Bayesian CART specification, so check the original paper before adopting any settings.
What modelling assumptions does the model make?
The likelihood family depends on the response. A Gaussian likelihood is standard for continuous responses in regression, and a multinomial likelihood, which includes the binary case, is standard for classification. Observations are assumed independent given the tree structure and the leaf parameters. Leaf parameters receive priors conjugate to the likelihood, typically a normal-inverse-gamma prior for regression leaf means and variances and a Dirichlet prior for class probabilities. Posterior summaries and intervals depend on these choices, so the specification should be checked against the data and the sensitivity to the prior should be assessed.
How do I know if the MCMC chain has converged?
Monitor quantities such as the log marginal likelihood and tree depth across iterations. Running several independent chains and checking that their posterior summaries agree is a practical diagnostic. Choose the burn-in length by inspecting the traces rather than applying a fixed rule.
Is there a relationship between Bayesian Decision Tree and BART?
Yes. BART (Bayesian Additive Regression Trees, Chipman et al. 2010) extends the single Bayesian decision tree to a sum of many small trees, each with a regularising prior. It is widely used for regression and causal inference.
Can Bayesian Decision Tree handle missing data?
Not natively. The standard formulation assumes complete data, so missing values should be imputed before fitting or the model extended with a missing-data model. Some implementations handle missingness via surrogate splits, as in CART, but this is not part of the original Bayesian CART specification.
Related methods
Sources
Chipman, H. A., George, E. I., & McCulloch, R. E. (1998). Bayesian CART model search. Journal of the American Statistical Association, 93(443), 935–948.
Open DOI referenceDenison, D. G. T., Mallick, B. K., & Smith, A. F. M. (1998). A Bayesian CART algorithm. Biometrika, 85(2), 363–377.
Open publication reference