Low-Level API#
In addition to high-level samplers for BART and BCF,
the stochtree
Python library provides direct access to many of the computational structures that
underlie stochastic tree algorithms: tree ensembles, sampling algorithms, and "tracking" data structures
that enable the algorithms to work effectively. This interface consists of:
- Data API: loading and storing in-memory data needed to train
stochtree
models. - Forest API: creating, storing, and modifying ensembles of decision trees that underlie all
stochtree
models. - Sampler API: sampling from stochastic tree ensemble models as well as several supported parametric models.
- Utilities API: seeding a C++ random number generator, preprocessing data, and serializing models to JSON (files or in-memory strings).