Reference

API reference for bartz. Each module page lists its public objects in summary tables organized by topic; follow a link for the dedicated page of an object.

High-level interface

bartz.Bart(x_train, y_train, *[, ...])

Nonparametric regression with Bayesian Additive Regression Trees (BART).

bartz.PredictKind(*values)

Kind of output of Bart.predict.

bartz.DataFrame(*args, **kwargs)

DataFrame duck-type for Bart.

bartz.Series(*args, **kwargs)

Series duck-type for Bart.

OutcomeType(*values)

Likelihood types for each outcome component in the regression.

R BART3-compatible interface

bartz.BART

Implement classes mc_gbart and gbart that mimic the R BART3 package.

stochtree-compatible interface

bartz.stochtree

stochtree-compatible interface to bartz.

MCMC and trees

bartz.mcmcstep

Functions that implement the BART posterior MCMC initialization and update step.

bartz.mcmcloop

Functions that implement the full BART posterior MCMC loop.

bartz.grove

Functions to create, manipulate, and check binary decision trees.

bartz.prepcovars

Functions and classes to preprocess data.

Debugging and testing

bartz.debug

Debugging utilities.

bartz.testing

Testing utilities to generate synthetic datasets.