bartz.BART.gbart¶
- class bartz.BART.gbart(*args, **kwargs)[source]¶
Subclass of
mc_gbartthat forcesmc_cores=1.- predict(x_test)[source]¶
Evaluate the sum-of-trees at
x_testfor each MCMC iteration.- Parameters:
x_test (
Real[Array, 'm p']|Real[ndarray, 'm p']|DataFrame) – The test predictors.- Returns:
Float32[Array, 'ndpost m']– Posterior samples of the latent function value atx_test. In the continuous case, this is the conditional mean.- Raises:
ValueError – If
x_testhas a different format thanx_train.
- property prob_test: Float32[Array, 'ndpost m'] | None[source]¶
The posterior probability of y being True at
x_testfor each MCMC iteration.
- property prob_test_mean: Float32[Array, 'm'] | None[source]¶
The marginal posterior probability of y being True at
x_test.
- property prob_train: Float32[Array, 'ndpost n'] | None[source]¶
The posterior probability of y being True at
x_trainfor each MCMC iteration.
- property prob_train_mean: Float32[Array, 'n'] | None[source]¶
The marginal posterior probability of y being True at
x_train.
- sigest: Float32[Array, ''] | None = None¶
The estimated standard deviation of the error used to set
lambda_.
- property sigma: Float32[Array, 'nskip_plus_ndpost'] | Float32[Array, 'nskip_plus_ndpost_per_core mc_cores'] | None[source]¶
The standard deviation of the error, including burn-in samples.
- property sigma_: Float32[Array, 'ndpost'] | None[source]¶
The standard deviation of the error, only over the post-burnin samples and flattened.
- property sigma_mean: Float32[Array, ''] | None[source]¶
The mean of
sigma, only over the post-burnin samples.
- property varcount: Int32[Array, 'ndpost p'][source]¶
Histogram of predictor usage for decision rules in the trees.
- property varprob: Float32[Array, 'ndpost p'][source]¶
Posterior samples of the probability of choosing each predictor for a decision rule.
- property varprob_mean: Float32[Array, 'p'][source]¶
The marginal posterior probability of each predictor being chosen for a decision rule.
- property yhat_test: Float32[Array, 'ndpost m'] | None[source]¶
The conditional posterior mean at
x_testfor each MCMC iteration.
- property yhat_test_mean: Float32[Array, 'm'] | None[source]¶
The marginal posterior mean at
x_test.Not defined with binary regression because it’s error-prone, typically the right thing to consider would be
prob_test_mean.
- property yhat_train: Float32[Array, 'ndpost n'][source]¶
The conditional posterior mean at
x_trainfor each MCMC iteration.
- property yhat_train_mean: Float32[Array, 'n'] | None[source]¶
The marginal posterior mean at
x_train.Not defined with binary regression because it’s error-prone, typically the right thing to consider would be
prob_train_mean.