我正在尝试使用xgboost处理一些金融数据,并想尝试使用伽马回归作为目标函数。
cvs <- xgb.cv(data = sparse_matrix, label = target, nfold = 10, nthread = 4, nround = 16, objective = "reg:gamma", metrics = list("mae"))
但使用这种方法的时间比使用线性回归作为目标函数要长得多。
而且还会抛出很多以下警告:
In foldVector[which(y == dimnames(numInClass)$y[i])] <- sample(seqVector) :
number of items to replace is not a multiple of replacement length
这个警告重复了大约50次。
是什么原因?我不能使用reg:gamma作为目标吗,因为reg:linear很好用,我只是在玩耍,想尝试不同的目标。
有人能指出为什么会出现这些警告吗?