predict.randomForest.prmdt: predict.randomForest.prmdt

View source: R/predict.R

predict.randomForest.prmdtR Documentation

predict.randomForest.prmdt

Description

Return prediction for a randomForest model.

Usage

## S3 method for class 'randomForest.prmdt'
predict(
  object,
  newdata,
  type = "class",
  norm.votes = TRUE,
  predict.all = FALSE,
  proximity = FALSE,
  nodes = FALSE,
  cutoff,
  ...
)

Arguments

object

a randomForest model object for which prediction is desired.

newdata

an optional data frame in which to look for variables with which to predict.

type

type of prediction 'prob' or 'class' (default).

norm.votes

Should the vote counts be normalized (i.e., expressed as fractions)? Ignored if object$type is regression.

predict.all

Should the predictions of all trees be kept?

proximity

Should proximity measures be computed? An error is issued if object$type is regression.

nodes

Should the terminal node indicators (an n by ntree matrix) be return? If so, it is in the “nodes” attribute of the returned object.

cutoff

(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.

Value

a vector or matrix of predictions for randomforest model.


PROMiDAT/trainR documentation built on Sept. 13, 2022, 7:26 a.m.