Return prediction for a randomForest model.
# S3 method for randomForest.prmdt
predict(
object,
newdata,
type = "class",
norm.votes = TRUE,
predict.all = FALSE,
proximity = FALSE,
nodes = FALSE,
cutoff,
...
)a vector or matrix of predictions for randomforest model.
a randomForest model object for which prediction is desired.
an optional data frame in which to look for variables with which to predict.
type of prediction 'prob' or 'class' (default).
Should the vote counts be normalized (i.e., expressed as fractions)? Ignored if object$type is regression.
Should the predictions of all trees be kept?
Should proximity measures be computed? An error is issued if object$type is regression.
Should the terminal node indicators (an n by ntree matrix) be return? If so, it is in the ``nodes'' attribute of the returned object.
(Classification only) A vector of length equal to number of classes. The `winning' class for an observation is the one with the maximum ratio of proportion of votes to cutoff. Default is taken from the forest$cutoff component of object (i.e., the setting used when running randomForest).
additional arguments affecting the predictions produced.