我在使用任何升压模型进行预测时,不断出现上述错误。可能是用xgboost或lightgbm。
在运行时。
import xgboost as xgb
xgb_c = xgb.XGBClassifier()
xgb_c.fit(x_train, y_train)
y_pred = xgb_c.predict(x_val)
在xgb_c.predict()中得到错误信息,为
ValueError: attempt to get argmax of an empty sequence
请给我点建议。我是数据科学方面的新手。我无法理解发生了什么。我试图重新安装xgboost,但问题仍然存在。
你可以看到代码 此处