梯度提升回归是否比随机森林更准确(更低的MSE)?

时间:2015-06-09 18:40:16

标签: r random-forest gbm

我刚创建了一个Gradient Boosting模型,其样本外预测比随机森林差。 GBM的MSE比随机森林高10%。以下是我的示例代码。我确定它是否有任何问题。

gbm1 <- gbm(as.formula(paste0(Y.idx ,'~', paste0(colnames(rf.tmp.train[c(-1,-2)],collapse=""))),
data=rf.tmp.train,distribution="gaussian",n.trees=3000,         
shrinkage=0.001,interaction.depth=1,bag.fraction = 0.5,          
train.fraction = 1,n.minobsinnode = 10, cv.folds = 10,       
keep.data=TRUE, verbose=FALSE,n.cores=1)

1 个答案:

答案 0 :(得分:0)

根据我的工作经验,gbm通常比随机森林表现更好,随机森林通常比其他算法表现更好。在您的情况下,您可能希望调整gbm和随机林的参数。首先,我建议自动执行调整过程的插入包。

干杯