Shap: TreeExplainer's shap_values do not contains intercept value, it is not consistent with the doc's description

Created on 22 Jul 2018  Â·  2Comments  Â·  Source: slundberg/shap

shap_model = shap.TreeExplainer(model)
shap_values = shap_model.shap_values(data)

shap_values.shape[1] is equal to data.shape[1]

Most helpful comment

Sorry the docs are updated on github but not yet on the pip version. In
your example use shap_model.expected_value

On Sun, Jul 22, 2018 at 6:14 AM Nick notifications@github.com wrote:

how could I get the value of intercept?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/171#issuecomment-406865807, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADkTxax_j2iQCMdcf3E0WKyQ_MKKyl6wks5uJHrAgaJpZM4VZ_b2
.

All 2 comments

how could I get the value of intercept?

Sorry the docs are updated on github but not yet on the pip version. In
your example use shap_model.expected_value

On Sun, Jul 22, 2018 at 6:14 AM Nick notifications@github.com wrote:

how could I get the value of intercept?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/171#issuecomment-406865807, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADkTxax_j2iQCMdcf3E0WKyQ_MKKyl6wks5uJHrAgaJpZM4VZ_b2
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabrielcs picture gabrielcs  Â·  3Comments

artemmavrin picture artemmavrin  Â·  4Comments

resdntalien picture resdntalien  Â·  3Comments

shoaibkhanz picture shoaibkhanz  Â·  4Comments

Nithanaroy picture Nithanaroy  Â·  4Comments