bartz.bcf

Implement Bayesian Causal Forests.

Main interface

bcf(x_train, y_train, z_train, *[, ...])

Bayesian Causal Forests (BCF).

BCFPrediction

The posterior samples returned by bcf.predict, chains concatenated.

BCFPotentialOutcomes

The posterior predictive samples returned by bcf.predict_potential_outcomes.

MCMC

The low-level functions that implement the MCMC of bcf, analogous to bartz.mcmcstep.init and bartz.mcmcstep.step.

init_bcf(*, X_unified, trt, y[, ...])

Initialize the MCMC state of a Bayesian Causal Forest.

step_bcf(key, state)

Do one BCF MCMC step.

BCFState(_chain_anchor, X, y, z, ...)

The full MCMC state for a Bayesian Causal Forest.

BCFBurninTrace(mu, tau, tau_0, b)

Burn-in trace of the BCF MCMC, the per-forest diagnostics and the scalar parameters.

BCFMainTrace(mu, tau, tau_0, b)

Main trace of the BCF MCMC, with the trees of both forests.