Predict from Saved Trees
predict_trees.RdGenerate predictions for new data using saved tree structures from a prince_bart fit.
Arguments
- trees
A data.frame of tree structures from a prince_bart fit.
- newdata
A matrix of covariates for prediction (can be unscaled if scaling is provided), or a list of matrices (one per posterior sample).
- scaling
Optional list with
centerandscalenamed vectors for standardizing newdata before prediction. Typically fromprince_bart_fit$scaling. If NULL, newdata is assumed to already be scaled.- n_cores
Number of cores for parallel prediction (default: 1).