predict.DECORATE: Predict method for DECORATE objects

Description Usage Arguments Value Examples

Description

Prediction of new data using DECORATE

Usage

1
2
## S3 method for class 'DECORATE'
predict(object, newdata, type = "prob", all = FALSE, ...)

Arguments

object

an object of the class DECORATE, as created by the function DECORATE.

newdata

a data frame containing the same predictors as in the training phase.

type

character specifying whether to return the probabilites ('prob') or class ('class'). Default: prob.

all

Return the predictions per tree instead of the average (default = FALSE).

...

Not used currently.

Value

vector containing the response probabilities.

Examples

1
2
3
4
5
data(iris)
y <- as.factor(ifelse(iris$Species[1:100]=="setosa",0,1))
x <- iris[1:100,-5]
dec <- DECORATE(x = x, y = y)
predict(object=dec,newdata=x)

DecorateR documentation built on Nov. 20, 2020, 5:10 p.m.