I'm a new R user, and also new to Random Forest modeling. I cannot seem to figure out how to obtain the out-of-bag (OOB) error estimates for cforest models built with the Party Package in R. In the randomForest package, the OOB error estimates are displayed if you simply "print" the model object, but the party package doesn't work the same way.
Run random forest model using randomForest package:
> SBrf<- randomForest(formula = factor(SB_Pres) ~ SST + Chla + Dist2Shr + DaylightHours + Bathy + Slope + MoonPhase + factor(Region), data = SBrfImpute, ntree = 500, replace = FALSE, importance = TRUE)
> print(SBrf)
Call:
randomForest(formula = factor(SB_Pres) ~ SST + Chla + Dist2Shr + DaylightHours + Bathy + Slope + MoonPhase + factor(Region), data = SBrfImpute, ntree = 500, replace = FALSE, importance = TRUE)
Type of random forest: classification
Number of trees: 500
No. of variables tried at each split: 2
OOB estimate of error rate: 23.67%
Confusion matrix:
0 1 class.error
0 823 127 0.1336842
1 211 267 0.4414226
Run random forest model using party package:
> SBcf<- cforest(formula = factor(SB_Pres) ~ SST + Chla + Dist2Shr+ DaylightHours + Bathy + Slope + MoonPhase + factor(Region), data = bll_SB_noNA, control = cforest_unbiased())
> print(SBcf)
Random Forest using Conditional Inference Trees
Number of trees: 500
Response: factor(SB_Pres)
Inputs: SST, Chla, Dist2Shr, DaylightHours, Bathy, Slope, MoonPhase, factor(Region)
Number of observations: 534
I've read through the manuals and vignettes but can't seem to find an answer. Does anyone know how to retrieve the OOB error estimates once you have run a random forest model using the party package? Or am I completely missing some very important difference between the two packages that results in no OOB error estimates for random forest models built with the party package?