GBM:找不到对象“ p”

时间:2018-08-17 09:17:08

标签: r gbm

我正在尝试在R中运行GBM代码:

gbmModel = gbm(formula = formula_gbm,
               distribution = "bernoulli",
               data = dev_new,
               n.trees = 200,
               interaction.depth = 6,
               train.fraction=0.6,
               bag.fraction = 0.6, 
               shrinkage = 0.4, 
               cv.folds=1,
               verbose = TRUE)  

当我尝试使用cv.folds = 0时,它可以完美运行-一旦我使用cv.folds> 0,我将面临以下错误。知道为什么会这样吗?预先感谢!

Iter   TrainDeviance   ValidDeviance   StepSize   Improve
     1        0.1165          0.1206     0.4000   -0.0037
     2        0.1977          0.2197     0.4000   -0.0484
     3        0.2706          0.2493     0.4000   -0.0606
     4        0.2705          0.2556     0.4000   -0.0047
     5        0.2691          0.2559     0.4000    0.0004
     6        0.2954             inf     0.4000   -0.0395
     7        0.2786             inf     0.4000    0.0076
     8        0.2790             inf     0.4000   -0.0010
     9        0.2694             inf     0.4000    0.0027
    10        0.2694             inf     0.4000   -0.0006

*Error in gbm(formula = formula_gbm, distribution = "bernoulli", data = dev_new,  : 
  object 'p' not found*

0 个答案:

没有答案