predict.rpart.prmdt: predict.rpart.prmdt

View source: R/predict.R

predict.rpart.prmdtR Documentation

predict.rpart.prmdt

Description

Return prediction for a rpart model.

Usage

## S3 method for class 'rpart.prmdt'
predict(object, newdata, type = "class", na.action = na.pass, ...)

Arguments

object

a rpart 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).

na.action

a function to determine what should be done with missing values in newdata. The default is to pass them down the tree using surrogates in the way selected when the model was built. Other possibilities are na.omit and na.fail.

...

additional arguments affecting the predictions produced.

Value

a vector or matrix of predictions for rpart model.


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