predict: Predict Method for forestr objects

Description Usage Arguments Value Examples

Description

Predict methods to predict from forestr tree and random forest within forestr using the predict function

Usage

1
2
## S3 method for class 'forestr'
predict(object, newdata, ...)

Arguments

object

an object of class forest as created by forest

newdata

dataframe containing new data

...

not currently used

Value

A list with the following components

response

the predicted classes or values for each observation

votes

if object$type is classification, the vote matrix used to create the prediction

Examples

1
2
mtcars.forestr <- forestr(factor(cyl) ~ ., data = mtcars[1:25, ])
predict(mtcars.forestr, mtcars[26:32, ])

andeek/forestr documentation built on May 12, 2019, 2:40 a.m.