我刚刚创建了一个梯度提升模型,其样本外预测比随机森林差。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)