bartz.mcmcstep.Sparsity

class bartz.mcmcstep.Sparsity(log_s, theta, a, b, rho, log_theta_range)[source]

The parameters of the prior probability of the variables to split along.

log_s: Float32[Array, '*chains p'] | None

The logarithm of the prior probability for choosing a variable to split along in a decision rule. Not normalized. Variables that do not have any available decision rule at a given node are masked away. If None, use a uniform distribution. Without theta, it is constant and shared by the chains, see has_chains.

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

The concentration parameter for the Dirichlet prior on the variable distribution s. If not set, log_s is left constant.

a: Float32[Array, ''] | None

First shape parameter of the prior on theta. If not set, theta is left constant.

b: Float32[Array, ''] | None

Second shape parameter of the prior on theta. If not set, theta is left constant.

rho: Float32[Array, ''] | None

Scale parameter of the prior on theta. If not set, theta is left constant.

log_theta_range: Float32[Array, ''] | None

The domain of theta is |log(theta / rho)| <= log_theta_range. None if theta is constant.

property has_chains: bool[source]

Whether log_s and theta carry a chain axis.

Only if theta is set and has a chain axis: otherwise log_s is constant and shared by the chains.