Skip to contents

predict.flexBART can take the output of flexBART and probit_flexBART and use it to make predictions at new inputs.

Usage

# S3 method for class 'flexBART'
predict(object, newdata, ...)

Arguments

object

object of class inhereting from “flexBART”.

newdata

Data frame in whch to look for variables with which to predict. Cannot be omitted.

...

Additional optional arguments governing whether to print progress (i.e., verbose and print_every).

Details

Make predictions at new inputs based on the output of flexBART. Useful when the testing dataset is quite large. If fit were produced by probit_flexBART, then the function outputs draws of the fitted probabilities.

Value

When there is only one ensemble, a matrix containing posterior samples of the regression function evaluated at the supplied inputs. For models with multiple ensembles, a list with three elements: (i) a matrix containing posterior samples of the regression function evaluation and (ii) an array containing evaluations of the identified slopes; and (iii) an array containing evaluations of all slopes on the standardized scale.