R: distributed predict method for applying a random forest...
predict.drandomForest
R Documentation
distributed predict method for applying a random forest objects on a darray or a dframe
Description
This function can be used to apply a model of type drandomForest or randomForest to a new data for prediction.
Usage
## S3 method for class 'drandomForest'
predict(object, newdata, trace=FALSE, ...)
Arguments
object
an object of class randomForest, as that
created by the function randomForest or
drandomForest.
newdata
a darray, a dframe, a data.frame, or a matrix
that contains new data. darray is highly recommended to dframe
when there is no categorial data
trace
when this argument is true, intermediate steps of the progress are displayed.
...
additional arguments to be passed to predict.randomForest
Value
It returns predicted classes in a distributed or non-distributed objects
depending on the type of the input. When the newdata is of type darray,
the type of returned value will be also darray unless the output is categorical data.
When the output is a dframe when the newdata is of type dframe.
Author(s)
Vishrut Gupta, Arash Fard, Winston Li, Matthew Saltz
References
Breiman, L. (2001), Random Forests, Machine Learning 45(1),
5-32.
See Also
drandomForest
Examples
## Not run:
# example for darray
library(ddR.randomForest)
nExecutor <- 2
iris.rf <- drandomForest(Species ~ ., iris,nExecutor = nExecutor)
iris.predictions <- predict(iris.rf,iris)
## End(Not run)