简体   繁体   English

R中的xgboost()出错

[英]Error in xgboost() in R

I am trying to use xgboost(), but I am getting following error: 我正在尝试使用xgboost(),但我收到以下错误:

Error in xgb.DMatrix(data, label = label) : can not open file "0"

If I traceback,

traceback()
4: .Call("XGDMatrixCreateFromFile_R", data, as.integer(FALSE), PACKAGE = "xgboost")
3: xgb.DMatrix(data, label = label)
2: xgb.get.DMatrix(data, label)
1: xgboost(data = as.matrix(trainSet[, 1:13]), label = trainSet[, 
"count"], max.depth = depth, nround = rounds, objective = "reg:linear", 
verbose = 0) at #5

Any reason why I am getting the above error. 我得到上述错误的任何原因。 I would appreciate any kind of help. 我将不胜感激任何帮助。

Thanks in advance! 提前致谢!

检查您的数据是否包含字符或因子变量,并尝试将它们转换为数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM