predict.rpart.prmdt {traineR}R 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.


[Package traineR version 2.2.0 Index]