Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgb_gbc.predict_proba(test_feature) Invalid missing value: null #6

Open
lvqiujie opened this issue Nov 9, 2021 · 0 comments
Open

Comments

@lvqiujie
Copy link

lvqiujie commented Nov 9, 2021

Hello, I met the following problem when reproducing your code, I would like to ask you for advice, looking forward to your reply.

`Traceback (most recent call last):
File "××××××××××××××××××/XGraphBoost-main/dmpnn_xgboost/train.py", line 13, in
model = cross_validate(args, logger)
File "××××××××××××××××××/XGraphBoost-main/dmpnn_xgboost/chemprop/train/cross_validate.py", line 64, in cross_validate
train_morgan_feature,val_morgan_feature,test_morgan_feature,test_preds)
File "××××××××××××××××××/XGraphBoost-main/dmpnn_xgboost/morgan_feature.py", line 212, in xgboost_cv
pre_pro = xgb_gbc.predict_proba(test_feature)[:, 1]
File "××××××××××××××××××/anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/sklearn.py", line 1354, in predict_proba
iteration_range=iteration_range
File "××××××××××××××××××/anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/sklearn.py", line 887, in predict
validate_features=validate_features,
File "××××××××××××××××××/anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/core.py", line 2042, in inplace_predict
ctypes.byref(preds),
File "××××××××××××××××××/anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/core.py", line 218, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [17:59:57] ../src/c_api/c_api_utils.h:161: Invalid missing value: null
Stack trace:
[bt] (0) /anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/lib/libxgboost.so(+0x972bd) [0x7f0a83d572bd]
[bt] (1) /anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/lib/libxgboost.so(+0xaed9c) [0x7f0a83d6ed9c]
[bt] (2) /anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/lib/libxgboost.so(+0xb4ebf) [0x7f0a83d74ebf]
[bt] (3) /anaconda3/envs/lv/lib/python3.6/site-packages/xgboost/lib/libxgboost.so(XGBoosterPredictFromDense+0x28d) [0x7f0a83d5b4ad]
[bt] (4) /anaconda3/envs/lv/lib/python3.6/lib-dynload/../../libffi.so.7(+0x69dd) [0x7f0b14bf69dd]
[bt] (5) /anaconda3/envs/lv/lib/python3.6/lib-dynload/../../libffi.so.7(+0x6067) [0x7f0b14bf6067]
[bt] (6) /anaconda3/envs/lv/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f0b14c0ed0e]
[bt] (7) /anaconda3/envs/lv/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x13745) [0x7f0b14c0f745]
[bt] (8) /anaconda3/envs/lv/bin/python3.6(_PyObject_FastCallDict+0x8b) [0x55b1f3ca50bb]

Process finished with exit code 1
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant