As of May 31, 2023, we have updated our Code of Conduct.

# Questions tagged [shapley-value]

The tag has no usage guidance.

75 questions
Filter by
Sorted by
Tagged with
92 views

### If feature importance is only computed based on training set, does it mean one should never compute shap values on test set?

If feature importance is only calculated from the training set according to here, does it mean one should never compute shap values on test set? What would it mean if I compute shap values from test ...
1 vote
37 views

### How can I compute the SHAP values in a high dimensional dataset?

I have a classiification problem with a dataset where the number of variables is very large, and the number of observations is small. Approximately 200 observations and 10000 variables. I am using a ...
1 vote
65 views

### SHAP values of Ensemble Model

I predict a continuous variable by taking the average of $N$ model predictions. The models are different in terms of their functional form, i.e. a tree model, a neural net, etc. Is the average SHAP ...
58 views

### importance score for correlated features xgboost

I am confused about the derivation of importance scores for an xgboost model. My understanding is that xgboost (and in fact, any gradient boosting model) examines all possible features in the data ...
1 vote
68 views

### Combined Shapley Values for Probability Models

Using Python I have created two separate XGBoost probability models. From these two models, I compute a final value by multiplying the outputs (probabilities) together to give a probability of both ...
1 vote
52 views

### SHAP values vs logistic regression

I read many articles about SHAP values and I get the general theory behind it. However, there's something that I have a difficulty with. When we try to explain LR models, we explain it in terms of ...
29 views

### SHAP features contibution plot for aggregrated model metrics explanaition

I'd like to use SHAP in a specific manner to explain contribution of features for average score per date For example let's craft some toy dataset import pandas as ...
340 views

### How do I interpret negative SHAP values for a marketing model?

I am building a marketing model to evaluate marketing channel effectiveness. My inputs are the marketing spend for each channel, and my target variable is sales. I have 3 years of weekly data in ...
1 vote
118 views

### Bounds of Shapley values for variable importance

Imagine you have either a very good predictive model $f$ for a response $y$ or two highly predictive models $f_1$ and $f_2$. Is it possible to bound the "true" Shapley values of $y$ in ...
359 views

### xgboost feature importance vs shap values ranking interpretation

If we have two features, A and B. Feature A has a higher gain than feature B when analyzing feature importance in xgboost with gain. However, when we plot the shap ...
24 views

### Comparing SHAP values across different trained version

I am having two random forest model trained for Week A and Week B of data for same set of features. With similar hyper parameters, let us say them as rf1 and rf2. I would like to bridge the difference ...
18 views

### How to measure the week over week variation of input variables?

I am trying to determine the week over week change in revenue. I have certain product attribute that contribute to the change in revenue. Does something like this of a formulation will be correct? ...
311 views

### Can someone explain the concept of Shapley value masking when working with tabular data and classification problems?

My understanding of a mask in arrays is to have boolean values matching the shape of a query array (n, m) where you would mask the query and perform an operation. For example, this operation to sum ...
1 vote
71 views

### Are shapely values invariant under monotonic feature transformation?

I have been using shap values as a measure of feature importance for some time. But, I have never understood the justification behind comparing the shap values for features that are on different ...
45 views

### Would it be ok to scale SHAP values and draw conclusions from them?

I’ve built a regression model to perform a certain task. For a given prediction task, I take the output from this model, multiply it by 0.77 and that is the final value that I use. If I apply shap to ...
48 views

### How to interpret the values returned by TreeShap for multilabel classification?

I have read in Molnar (2022) and Gianfagna (2021) books that the TreeShap method returns the exact Shapley values of Shapley (1951). The Shapley value estimates, given the current set of feature ...
64 views

### How to do Causal Inference for Observational Data [Supply Cain]?

Problem statement: Understand what factors impact the different operational times in a supply chain warehouse operation. I have observational data (past 1 year) which contains number of orders, ...
1 vote
95 views

### Calculating performance scores by subtracting the Shapley feature effects from predictions

One of my friends has done the following: He trained an XGBoost model let's call it Model 1 and then calculated the feature effects using Shapley for the different ...
252 views

### Combining and plotting SHAP results across cross-validation splits

How does one combine SHAP results across cv splits, specifically using sklearn's train_test split? The closest solution I have found is here, which I have adjusted like so, using the publically ...
1 vote
91 views

### Does there exist any causal explainability tool for NNs?

Say I have a neural network which has 1,000,000 parameters built using 100 features and I wish to understand the underlying data-generating process for how the model arrived at each prediction. Simply ...
288 views

### How to interpret Shap summary plot on causal application with X,T,Y?

I am trying to make sense of how to interpret the following Shap plot given the context of a causal model. See article of relevance: https://towardsdatascience.com/causal-machine-learning-for-...
1 vote
65 views

### Pooling SHAP values from multiple imputed data

I have multiple imputed data and will be conducting an identical lightGBM model with the same input features in each of the imputed datasets. My aim is to calculate SHAP values (SHapley Additive ...
794 views

### SHAP value transformation to probabilities

For my research project, I use SHAP values for plotting multiple diagrams to investigate the prediction process for a XGBoost and CatBoost model. I wonder how ...
1 vote
246 views

### Total contribution of feature using SHAP values in multi-output regression problem

I am interested in using SHAP values to perform wrapper-based feature selection. The model has 3 outputs, and I do have SHAP values for each output, using GradientExplainer, but even after a bit of ...
184 views

### Understanding feature importance for collinear features with tree-based models

I'm trying to understand how collinearity affects feature importance for tree-based models. My understanding is that tree-based models naturally overcome multicollinearity for the purposes of ...
25 views

### Integration part from Shapley value equation

Reading following page, I can't understand integration part https://christophm.github.io/interpretable-ml-book/shapley.html#the-shapley-value-in-detail I can't understand following two equations Eq0 : ...
15 views

948 views

### SHAP for stacking classifier

We are using a stacking classifier to solve a classification problem. The data feed 5 base models, the predicted probabilities of the base models feed the supervisory classifier. We would like to use ...
101 views

### When interpreting machine learning models, should preprocessing steps be considered as part of "model"?

Suppose I have some inputs on which I first apply some feature engineering and then apply a machine learning algorithm such as random forest to make predictions. Now, if I want to interpret/explain ...
840 views

### How shap values behave in terms of multicollinearity in Trees, Ensemble, GradientBoosting and GAM/Boosting

I set up an experiment with these 8 Regressor Methods: sklearn package DecisionTreeRegressor, RandomForestRegressor, ExtraTreesRegressor, GradientBoostingRegressor other packages CatBoostRegressor ,...
1 vote
51 views

### Why do Shapley values increase over time?

I calculated the Shapley values (using xgboot package, gbm regression model) of several big actors in the cocoa market and received results which I cannot explain: it seems that Shapley increases (the ...
3k views

### Are SHAP values potentially misleading when predictors are highly correlated?

Are SHAP (SHapley Additive exPlanations) values potentially misleading when predictors are highly correlated? How and why? If so, is there any guidance on when not to use SHAP? Are there any rules ...
1 vote
180 views

### feature importance aggregation

I have more of a conceptual question I was hoping to get some feedback on. I am trying to run a boosted regression ML model to identify a subset of important predictors for some clinical condition. ...
772 views

### Is there any reason to use LIME now that shap is available?

The context: explaining a binary classifier XGBoost model. If we say that we are limited to the LIME and Shapley Additive Explanation aka "shap" package, is there any reason to use LIME? My ...
92 views

### Aggregating SHAP values obtained from different models?

I have SHAP values for two models (sklearns's GradientBoostingClassifier and RandomForestClassifier). They are positively correlated. Rank correlation (r_s) between the SHAP values of the two models ... 44 views

### shap value of a shuffled feature [closed]

Imagine I have a model to predict a 100 target values y based on 10 features stored in a X table (100 by 10). Similarly to what ...
1 vote
76 views

### How does Shapley obtain values in the probability space in tree classifiers?

By default, the Shapley values for a tree explainer (e.g. based on xgboost) are in the log odds space (where they are additive). However, there's a functionality in the package to obtain values in the ...
1 vote
78 views

### Can adding more data, influence the SHAPley values?

I am having a classification dataset. Everytime I add more data to the dataset the SHAP values are getting changed and the top list of features are changed. Can anyone explain what is this behavior? ...
1 vote
97 views

### Calculate overall attribution with Shapley values

I'm using a shap KernelExplainer to interprete my model and I'd like to display an indication of why the explainer sorted the features in that order. For example, some kind of overall score that ...
1 vote