You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run a TreeExplainer for a XGBoost model setup with the tweedie loss, I get an error stating that some internal self.base_score of the TreeExplainer object cannot be found.
This issue also exists for objective="count:poisson"
bastienqb
changed the title
BUG: base_score attribute of the XGBTreeModelLoader is broken for the tweedie loss
BUG: base_score attribute of the XGBTreeModelLoader is broken for all exponential losses (e.g. tweedie, poisson)
Mar 20, 2024
Issue Description
When trying to run a
TreeExplainer
for a XGBoost model setup with thetweedie
loss, I get an error stating that some internalself.base_score
of theTreeExplainer
object cannot be found.Minimal Reproducible Example
Traceback
Expected Behavior
The
base_score
attribute should be initialised properly with no error.The line 1873 should be
self.base_score = np.log(base_score)
without referring toself
.Bug report checklist
Installed Versions
shap==0.45.0
The text was updated successfully, but these errors were encountered: