X_train is Preprocessed on line 912, but X_test_raw is not preprocessed for bart model. This would raise the following error:
Error in [.data.frame(input_df, , numeric_vars, drop = FALSE): undefined columns selected
Traceback:
- bart(X_train = X_train, y_train = as.numeric(Z_train), X_test = X_test_raw,
. num_gfr = num_total, num_burnin = 0, num_mcmc = 0)
- preprocessPredictionData(X_test, X_train_metadata)
- preprocessPredictionDataFrame(input_data, metadata)
- input_df[, numeric_vars, drop = FALSE]
[.data.frame(input_df, , numeric_vars, drop = FALSE)
- stop("undefined columns selected")
- .handleSimpleError(function (cnd)