rf.combine: Combine Random Forests Ensembles

View source: R/rf.combine.R

rf.combineR Documentation

Combine Random Forests Ensembles

Description

Combine two more more random forests models into a single ensemble.

Usage

rf.combine(...)

Arguments

...

two or more randomForest class objects as individual objects or a list containing models

Details

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

Value

An object of class randomForest

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

See Also

randomForest for randomForest details

combine for original combine function details

Examples

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) )				   


jeffreyevans/rfUtilities documentation built on Nov. 12, 2023, 6:52 p.m.