0

我尝试构建 gbm 模型并准备了变量的部分依赖图,但出现了错误。

partial(gbm.fit.final,pred.var = "lstat", n.trees = gbm.fit.final$n.trees, grid.resolution = 100)

Error in copy_classes(pred.grid, train) : 
  sapply(x[column.names], class) and sapply(y[column.names], class) are not equal:
  Lengths: 1, 2
  names for target but not for current
  Attributes: < names for current but not for target >
  ....

我不确定是什么问题,请解决此问题。

4

0 回答 0