Description Usage Arguments Value Note Author(s) See Also Examples
Combine two more more random forests models into a single ensemble.
1 |
... |
two or more randomForest class objects as individual objects or a list containing models |
An object of class randomForest
The confusion, err.rate, mse and rsq components (as well as the corresponding components in the
test component, if exist) are averaged across ensembles. This is a modification of the
randomForest combine
function that returns averaged validation
statistics
Jeffrey S. Evans <jeffrey_evans@tnc.org>
randomForest
for randomForest details
combine
for original combine function details
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(randomForest)
data(iris)
c1 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
c2 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
c3 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
( class.combine <- rf.combine(c1,c2,c3) )
data(airquality)
set.seed(131)
r1 <- randomForest(Ozone ~ ., data=airquality, mtry=3,
importance=TRUE, na.action=na.omit)
r2 <- randomForest(Ozone ~ ., data=airquality, mtry=3,
importance=TRUE, na.action=na.omit)
r3 <- randomForest(Ozone ~ ., data=airquality, mtry=3,
importance=TRUE, na.action=na.omit)
( regress.combine <- rf.combine(r1,r2,r3) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.