I am getting completely different results from cforest and randomForest with regards to variable importance (mean decrease in accuracy):
require(randomForest)
require(party)
require(RCurl)
x <- getURL("https://raw.githubusercontent.com/mguzmann/r-funcs/master/data/tempData.csv")
tempData <- read.csv(text = x, quote="\"", row.names=1)
tempData$resp = as.factor(as.numeric(tempData$resp))
tempData$a = as.factor(as.numeric(tempData$a))
tempData$b = as.factor(as.numeric(tempData$b))
tempData$c = as.factor(as.numeric(tempData$c))
tempData$d = as.factor(as.numeric(tempData$d))
tempData.rf = randomForest(resp ~., tempData, importance=T)
importance(tempData.rf)
(simplified output)
MeanDecreaseAccuracy
a 10.18511
b 15.88859
c 27.13357
d 15.36184
tempData.cf = cforest(resp ~., tempData,
controls=cforest_unbiased(ntree=500, mtry=4))
varimp(tempData.cf)
MeanDecreaseAccuracy
a 0.02219259 b 0.02903704 c 0.06500741 d 0.03765926
How should I compare these numbers and interpret their discrepancies? Why does this happen?