I am using the XGBoost classifier for multilabel classification. I have 7 labels, each of binary nature. While running the script, at the .fit() method, I am getting the following error,
MultiLabelML_Estimator.fit(X_train, Y_train_Temp)
File "c:usersankushanaconda3libsite-packagesskmultilearnproblem_transformr.py", line 161, in fit
classifier.fit(self._ensure_input_format(
File "c:usersankushanaconda3libsite-packagesxgboostsklearn.py", line 828, in fit
self._Booster = train(xgb_options, train_dmatrix,
File "c:usersankushanaconda3libsite-packagesxgboostraining.py", line 208, in train
return _train_internal(params, dtrain,
File "c:usersankushanaconda3libsite-packagesxgboostraining.py", line 75, in _train_internal
bst.update(dtrain, i, obj)
File "c:usersankushanaconda3libsite-packagesxgboostcore.py", line 1159, in update
_check_call(_LIB.XGBoosterUpdateOneIter(self.handle,
File "c:usersankushanaconda3libsite-packagesxgboostcore.py", line 188, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
XGBoostError: value 0 for Parameter num_class should be greater equal to 1
num_class: Number of output class in the multi-class classification.
[... skipped 1 hidden frame]
I search a lot of material on the internet like https://stackoverflow.com/questions/62225734/xgboosterror-value-0-for-parameter-num-class-should-be-greater-equal-to-1
but did not find any suitable solution.
Does anyone have any idea about this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…