predict.DECORATE {DecorateR} | R Documentation |
Predict method for DECORATE objects
Description
Prediction of new data using DECORATE
Usage
## S3 method for class 'DECORATE'
predict(object, newdata, type = "prob", all = FALSE, ...)
Arguments
object |
an object of the class |
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
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)
[Package DecorateR version 0.1.2 Index]