Predict the response for newdata with the surrogate tree
# S3 method for TreeSurrogate
predict(object, newdata, type = "prob", ...)
The surrogate tree. A TreeSurrogate R6 object
A data.frame for which to predict
Either "prob" or "class". Ignored if the surrogate tree does regression.
Further argumets for predict_party
A data.frame with the predicted outcome. In case of regression it is the predicted \(\hat{y}\). In case of classification it is either the class probabilities *(for type "prob") or the class label (type "class")
This function makes the TreeSurrogate object call its iternal object$predict() method. For examples see tree.surrogate