R(gbm封装)中的梯度增强预测问题

时间:2019-06-28 20:13:44

标签: r machine-learning

library(xgboost)
library(gbm)
creditcard.boost=gbm((Class) ~ . ,data = smote_creditcard,distribution= "bernoulli",n.trees = 10000,shrinkage = .01,n.minobsinnode = 20)

class_prediction <- predict(object = creditcard.boost, newdata = creditcard_test,n.trees=10000)


library(caret)
library(e1071)
class_prediction<-as.factor(class_prediction)
confusionMatrix(data = class_prediction, reference = creditcard_test$Class)

“预测”功能的输出产生NaN,而没有预测。

0 个答案:

没有答案