View source: R/predict_flexBART.R
| predict.flexBART | R Documentation |
predict.flexBART() can take the output of flexBART and use it to make predictions at new inputs.
## S3 method for class 'flexBART'
predict(object, newdata, ...)
object |
object of class inheriting from “flexBART”. |
newdata |
Data frame in which to look for variables with which to predict. Cannot be omitted. |
... |
Additional optional arguments governing whether to print progress (i.e., |
Make predictions at new inputs based on the output of flexBART.
When the training and/or testing dataset is large, it is recommended to run flexBART with the arguments
save_samples = FALSE and save_trees = TRUE.
Then, to access posterior samples of the function evaluations, pass the fitted “flexBART” object to predict.flexBART()
along with the appropriate newdata argument.
For probit or logistic BART, the function outputs draws of the fitted probabilities.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.