dmlc / dmlc/xgboost

SHAP value with refreshed tree.

Open
#8,199 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

Change https://github.com/dmlc/xgboost/blob/d03794ce7a6d5772bd5c3b7d74b7a92557f2e984/demo/guide-python/update_process.py to using CPU, one should be able to reproduce an error:
```
File "./demo/guide-python/update_process.py", line 94, in
main()
File "./demo/guide-python/update_process.py", line 68, in main
refreshed_SHAP = refreshed.predict(Xy, pred_contribs=True)
File "/home/jiaming/Workspace/XGBoost/xgboost/python-package/xgboost/core.py", line 2085, in predict
_check_call(
File "/home/jiaming/Workspace/XGBoost/xgboost/python-package/xgboost/core.py", line 250, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [16:27:43] /home/jiaming/Workspace/XGBoost/xgboost/src/tree/tree_model.cc:1322: Check failed: unique_path[i].pweight == 0 (-nan vs. 0) : Unique path 3 must have zero weight
Stack trace:
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with demo/guide-python/update_process.py, especially main() and the refreshed.predict call around lines 68-94, and reproduce the failure with CPU as described. Trace the SHAP contribution path through xgboost/src/tree/tree_model.cc:1322; done means the refreshed-tree prediction no longer raises the reported unique-path weight error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.