StatMixedML / LightGBMLSS

An extension of LightGBM to probabilistic modelling
https://statmixedml.github.io/LightGBMLSS/
Apache License 2.0
265 stars 25 forks source link

SHAP interpretations from zero-adjusted gamma model #35

Closed p-schaefer closed 6 months ago

p-schaefer commented 7 months ago

Discussed in https://github.com/StatMixedML/LightGBMLSS/discussions/34

Originally posted by **p-schaefer** February 5, 2024 I am trying to understand the SHAP outputs from a Zero-Adjusted Gamma. I'll outline my questions below: 1. SHAP scores should sum to the models predictions. In the LSS context for a ZAG, they should sum to the `concentration`, `rate`, and `gate` shape parameters that are output from `predict(..., pred_type="parameters")`, correct? I find this is not quite the case when I look at the outputs of `shap.TreeExplainer()`. So I assume there is some transformation happening. Could someone elaborate on what those transformations are, and what they look like. 2. This one is maybe more general, but just in terms of interpreting the SHAP values for the shape distribution parameters, in the context of the transformations. If an observation's feature has a negative SHAP score for the `gate` parameter, that would imply it is, on average, decreasing the probability of a 0 outcome, and a positive SHAP score would imply it is increasing the probability of a 0 outcome. Is that interpretation correct? 3. In a normal Gamma distribution, the mean can be described by multiplying `concentration` and `rate` (I think). Can multiplying the SHAP scores for `concentration` and `rate` be used as a high level descriptor of the predictors effects on the non-zero mean part of the distribution? And, how does the transformations affect the results of that? Thank you!
StatMixedML commented 6 months ago

I am closing this since it is in the discussion section already...