rbartpackages.bartMachine.bart_machine_get_posterior

rbartpackages.bartMachine.bart_machine_get_posterior(bart_machine, new_data, *, verbose=True)[source]

Posterior draws of f(x) at the rows of new_data.

The draws are probabilities of the first level for classification fits. R returns a list, exposed here as a Posterior dict.

Parameters:
  • bart_machine (bartMachine) – The fitted model to predict from.

  • new_data (DataFrame) – Predictors to predict at, with the same columns as the training data.

  • verbose (bool, default: True) – Whether to print prediction messages to the R console.

Returns:

Posterior – The posterior draws at new_data, as a Posterior dict.