当前位置: 代码迷 >> 综合 >> 135: Check failed: !auc_error AUC: the dataset only contains pos or neg samples
  详细解决方案

135: Check failed: !auc_error AUC: the dataset only contains pos or neg samples

热度:53   发布时间:2023-10-10 06:52:22.0

调用

xgb.cv(xgb_param, xgtrain, num_boost_round=alg.get_params()['n_estimators'], nfold=cv_folds,

metrics='auc', early_stopping_rounds=early_stopping_rounds),

正负样本其中一个较少,nfold设置折数多,导致错误发生

  相关解决方案