bartz.stochtree.GeneralParams

class bartz.stochtree.GeneralParams(*, standardize=True, sigma2_init=None, sigma2_global_shape=0.0, sigma2_global_scale=0.0, variable_weights=None, random_seed=None, keep_every=1, num_chains=1, outcome_model=<factory>)[source]

Mirror of stochtree’s general_params dict, with the keys bartz handles.

standardize: bool = True

Whether to standardize the outcome before fitting. Ignored for probit binary.

sigma2_init: float | Float[Array, ''] | Float[ndarray, ''] | None = None

Starting value of the global error variance. If None (default), uses var(resid_train) for continuous and 1.0 for probit.

sigma2_global_shape: float | Float[Array, ''] | Float[ndarray, ''] = 0.0

Shape parameter of the inverse-gamma prior on the global error variance. The default 0 is mapped to a near-improper prior, since bartz’s scaled-inv-chi² cannot represent IG(0, 0) exactly.

sigma2_global_scale: float | Float[Array, ''] | Float[ndarray, ''] = 0.0

Scale parameter of the inverse-gamma prior on the global error variance. The default 0 is mapped to a near-improper prior, since bartz’s scaled-inv-chi² cannot represent IG(0, 0) exactly.

variable_weights: Float[Array, 'p'] | Float[ndarray, 'p'] | None = None

Per-predictor sampling weights. Must be strictly positive; pass a small positive value to suppress a variable.

random_seed: int | Key[Array, ''] | None = None

Seed for the random number generator. Unlike stochtree, the default None is deterministic (equivalent to seed 0) rather than drawing a random seed, so repeated fits reproduce by default.

keep_every: int = 1

Thinning factor for retained MCMC samples.

num_chains: int = 1

Number of independent MCMC chains.

outcome_model: OutcomeModel

Outcome family and link specification. Defaults to continuous with identity link.