使用Caret和Xgboost算法的训练模型。 训练因错误而停止。
网格设置
expand.grid(nrounds = c(12,15, 17, 20, 22,24,26,28), #
max_depth = c( 3, 4, 5, 6,7,8,9,10), #
eta = c(.001,.05,.06,0.07,0.08,.1,.2,.3, .4),
gamma = c(0, .1,.2,.3,.4,.5,.6,.7),
colsample_bytree = c(.5,.6,.7, .8, .9,1),#
min_child_weight = c(1,2,3),#
subsample = c(.6,.7,.8, .9, 1)
sample.int中的错误(n = 1000000L,size = num_rs * nrow(trainInfo $ loop) +:当&替换= FALSE'
时,不能采样大于人口的样本
数据集我有2500行和50个参数。如何修复此错误并训练模型?