bartz.mcmcloop.BurninTrace

class bartz.mcmcloop.BurninTrace(has_chains, mesh, grow_prop_count, grow_acc_count, prune_prop_count, prune_acc_count, error_cov_inv, theta, log_likelihood, log_trans_prior)[source]

MCMC trace with only diagnostic values.

has_chains: bool

Whether the trace carries an explicit chain axis.

mesh: Mesh | None

The device mesh the trace arrays are sharded on, or None.

grow_prop_count: Int32[Array, '*chains_and_samples']

The number of grow proposals made during one full MCMC cycle.

grow_acc_count: Int32[Array, '*chains_and_samples']

The number of grow moves accepted during one full MCMC cycle.

prune_prop_count: Int32[Array, '*chains_and_samples']

The number of prune proposals made during one full MCMC cycle.

prune_acc_count: Int32[Array, '*chains_and_samples']

The number of prune moves accepted during one full MCMC cycle.

error_cov_inv: Float32[Array, '*chains_and_samples'] | Float32[Array, '*chains_and_samples k k']

The inverse error covariance (scalar for univariate, matrix for multivariate). Identity in binary regression.

theta: Float32[Array, '*chains_and_samples'] | None

The concentration parameter of the Dirichlet prior on the variable split probabilities, or None if it was not sampled.

log_likelihood: Float32[Array, '*chains_and_samples num_trees'] | None

The log likelihood ratio of the proposed move on each tree, or None.

log_trans_prior: Float32[Array, '*chains_and_samples num_trees'] | None

The log transition and prior Metropolis-Hastings ratio of the proposed move on each tree, or None.

classmethod from_state(state)[source]

Create a single-item burn-in trace from a MCMC state.

Return type:

BurninTrace