I have a dataset that has small number of rows (~10) and large number of features (~100). I use early stopping and CV and keep getting the following error. Dataset does not contain nan. I have tried tweaking many parameters - but still keep getting this error. Any idea on how to resolve this ?
0%| | 0/100 [22:09<?, ?trial/s, best loss=?]/home/ubuntu/anaconda3/lib/python3.7/site-packages/sklearn/model_selection/validation.py:552: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File “/home/ubuntu/anaconda3/lib/python3.7/cmd.py”, line 214, in onecmd
func = getattr(self, 'do’ + cmd)
AttributeError: ‘Pdb’ object has no attribute ‘do_score’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/sklearn/model_selection/_validation.py”, line 531, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/core.py”, line 436, in inner_f
return f(**kwargs)
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/sklearn.py”, line 1187, in fit
callbacks=callbacks,
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/training.py”, line 197, in train
early_stopping_rounds=early_stopping_rounds)
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/training.py”, line 76, in _train_internal
bst = callbacks.before_training(bst)
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/callback.py”, line 376, in before_training
model = c.before_training(model=model)
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/callback.py”, line 515, in before_training
self.starting_round = model.num_boosted_rounds()
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/core.py”, line 2007, in num_boosted_rounds
_check_call(_LIB.XGBoosterBoostedRounds(self.handle, ctypes.byref(rounds)))
File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/core.py”, line 210, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [14:53:47] …/src/metric/metric.cc:49: Unknown metric function l
Stack trace:
[bt] (0) /home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x9133f) [0x7f6014a5f33f]
[bt] (1) /home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x1fcd0f) [0x7f6014bcad0f]
[bt] (2) /home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x1d2378) [0x7f6014ba0378]
[bt] (3) /home/ubuntu/anaconda3/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(XGBoosterBoostedRounds+0x1a) [0x7f6014a4d39a]
[bt] (4) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/…/…/libffi.so.7(+0x69dd) [0x7f604d1f79dd]
[bt] (5) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/…/…/libffi.so.7(+0x6067) [0x7f604d1f7067]
[bt] (6) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2f4) [0x7f604bc86794]
[bt] (7) /home/ubuntu/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x10ff8) [0x7f604bc86ff8]
[bt] (8) python(_PyObject_FastCallKeywords+0x48b) [0x56210a01ea5b]
FitFailedWarning)