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_paramsdict, 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), usesvar(resid_train)for continuous and1.0for 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
0is mapped to a near-improper prior, since bartz’s scaled-inv-chi² cannot representIG(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
0is mapped to a near-improper prior, since bartz’s scaled-inv-chi² cannot representIG(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
Noneis deterministic (equivalent to seed0) rather than drawing a random seed, so repeated fits reproduce by default.
- outcome_model: OutcomeModel¶
Outcome family and link specification. Defaults to continuous with identity link.