Closed RickPack closed 1 year ago
The error is defined in the R source code for XGboost here: https://github.com/dmlc/xgboost/blob/master/R-package/R/xgb.DMatrix.R
# get dmatrix from data, label
# internal helper method
xgb.get.DMatrix <- function(data, label = NULL, missing = NA, weight = NULL, nthread = NULL) {
if (inherits(data, "dgCMatrix") || is.matrix(data)) {
if (is.null(label)) {
stop("label must be provided when data is a matrix")
}
As mentioned in Issue #97 we've already found a solution for that problem
This causes XGBoost to return:
Error in xgb.get.DMatrix(data, label, missing, weight, nthread = merged$nthread) : label must be provided when data is a matrix
Using economics from the ggplot2 package: