# Tag Info

3

This is very similar to fitting a linear regression and not including an intercept, and I think they will face similar issues. To be very concrete, consider an example with $f(x)=1,\ E=1, \ \phi_1=1, \ \phi_2=-1$. Then your scaling factor is undefined, trying to divide by zero. Well OK, but you won't often get such exact numbers. Let's tweak them to $$f(x)=... 2 As you say, it's the value of a feature-less model, which generally is the average of the outcome variable in the training set (often in log-odds, if classification). With force_plot, you actually pass your desired base value as the first parameter; in that notebook's case it is explainer.expected_value, the average of the second class. https://github.... 2 Since SHAP gives you an estimation of an individual sample (they are local explainers), your explanations are local(for a certain instance) You are just comparing two different instances and getting different results. This is normal and can happen in train and test set. This doesn't mean also that your train and test set have bad split, they could be good ... 2 Shapley values were designed in the context of game theory (source), to share value created by a coalition of player in a game. It has multiple properties, including linearity. The linearity ensure that if you were to average your models, the resulting Shapley value would be the average of Shapley values for individual models. Shapley values are comparable ... 1 I had the same question, and according to this link: Grey represents the categorical values which cannot be scaled in high or low. Concerning the other questions, I found this link: https://github.com/slundberg/shap/issues/960 Where slundberg states: In the linear model SHAP does indeed give high importance to outlier feature values. For a linear (or ... 1 catboost::catboost.get_feature_importance(model, pool = pool, type = "ShapValues") 1 You have to make sure that the problem doesn't come from your data or your model : Make sure that your data don't change significantly (same % of classes) but also general distribution / correlation of features, correlation between features and output. Make sure that your model is not overfit on your train data. Once you have made sure of that, the idea ... 1 From https://en.wikipedia.org/wiki/Shapley_value, it is possible to understand that direct computation of Shapley values is difficult with their general formula :$$ \varphi_i(v) = \frac{1}{\text{number of players}} \sum_{\text{coalitions excluding }i} \frac{\text{marginal contribution of }i\text{ to coalition}}{\text{number of coalitions excluding } i \...

1

Depending on your model there may be some better model-specific approaches than SHAP. It is also important to note that SHAP is an approximation of Shapley value, with the main assumption of not having too much correlation between your features. That being said, taking the mean instead of the mean absolute values seems to be the most efficient approach in ...

1

The paper you refer to actually states the following intuition: Algorithm 1 estimates $E[f(X)|do(X_S = x_S )]$ by recursively following the decision path for $x$ if the split feature is in $S$, and taking the weighted average of both branches if the split feature is not in $S$. It seems to be a slight modification of the original description in arxiv ...

1

I did some research and learnt about xgbfir package. It gives the joint contributions into an excel file. You can set the level of interaction with this. I wrote some code around it to generate a plot that solves the purpose. If the package is not installed pip install xgbfir After the installation: import xgbfir from matplotlib import pyplot as plt ...

Only top voted, non community-wiki answers of a minimum length are eligible