如何在Rattle上为xgboost生成混淆矩阵?

时间:2018-11-16 04:23:15

标签: r rstudio rattle

我正在Rattle上尝试Extreme Boosting(xgboost),不幸的是无法为此产生混淆矩阵! 我的拨浪鼓版本是5.2.0。

我得到的错误是:

An error occured in the following command:

lvls <- levels(as.factor(crs$dataset[[crs$target]]))
crs$pr <- factor(ifelse(predict(crs$ada, crs$dataset[crs$validate, c(crs$input, crs$target, crs$target)]) > 0.5,
            lvls[2], lvls[1])). 

The error message was:

Error in predict.xgb.Booster(object, newdata = x, ...) : 
  Feature names stored in `object` and `newdata` are different!

0 个答案:

没有答案