Skip to main content

Questions tagged [shapley-value]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
42 views

Why does the SHAP formula not state that |S| = |F|-1?

I recently read the paper "A unified approach to interpreting model predictions" by Scott M. Lundberg and Su-In Lee. In the paper, they establish that the Shapley value for the feature $i$ ...
Johan Nilsson's user avatar
1 vote
0 answers
62 views

Normality of $z$ transformation without preliminary assumption

Assuming data $X_1,...,X_n, Y_1,...,Y_n$ we have Pearson correlation $r=\frac{Cov(X,Y)}{\sigma_X\sigma_Y}$. Fisher's $z$ transform is then $$z=0.5\log\left(\frac{1+r}{1-r}\right)=\tanh^{-1}(r)$$ If $(...
Spätzle's user avatar
  • 4,002
2 votes
1 answer
35 views

Questions about the process of feature selection through feature importance

'Shap feature importance' was obtained through xgboost, and variables with the lowest feature importance were removed one by one from 50 variables until only 1 variable remained. As a result of ...
JAE's user avatar
  • 89
0 votes
0 answers
40 views

Is it necessary to average the shap values ​that have been processed through cross validation?

Is it necessary to average the shap values ​​that have been processed through cross validation? I saw an online site called 'towardsdatascience' that calculated the shap value through 10 CV and then ...
JAE's user avatar
  • 89
1 vote
0 answers
27 views

What does the shap interaction value of a feature with itself mean?

SHAP allows us to compute interaction effects by considering pairwise feature attributions. This leads to a matrix of attribution values representing the impact of all pairs of features on a given ...
figs_and_nuts's user avatar
3 votes
1 answer
48 views

Features available during training but not at prediction

Broadly, my motivation is to understand if/how features available during training but not at prediction can be used to improve the prediction accuracy of a machine learning model. This question is ...
Foster's user avatar
  • 31
0 votes
0 answers
92 views

Shap values associated to missing features

I have a model trained with Xgboost on some training data X_train, described by 10 features (x$_{1}$,...,x$_{10}$) and some of them might exhibit some missingness, i.e. some x$_{i}$ = NaN. This is ok ...
MarcoC's user avatar
  • 3
0 votes
0 answers
26 views

Can SHAP values across different models in the same family of models trained on different datasets be aggregated?

Let's say I have time - series data for 100 products in a particular store. I fit 100 regression models to generate 1-step forecasts for these products. Let's say that all features are common across ...
Tamojit Maiti's user avatar
0 votes
0 answers
24 views

Am I able to calculate SHAP directly for my testing dataset?

I trained an XGBoost classifier model on a training set, and I predicted it on the testing set. I also calculated the respective class prediction values. I concatenated X_test and y_test together. I ...
bob jones's user avatar
1 vote
0 answers
45 views

Can Shapley Value Analysis help with this problem?

Consider a service like Netflix. A drop in user engagement is a leading indicator of churn (users unsubscribing). They try various things to keep people hooked. Other than making engaging content ...
ottodidakt's user avatar
0 votes
0 answers
24 views

Should the expectation of an variable in shap method being zero?

I don't know if I misunderstand the concept of shap value: so for all sample's target var(y), there is an expectation of them, or E(f(x)), which is set to as the horizontal line of shap, which is set ...
cloudscomputes's user avatar
2 votes
2 answers
75 views

Why does my neural network consider different features important compared to my decision tree?

I built a neural network and a decision tree using very similar data sets (the only difference was the randomness of selecting the training vs testing set). The variables with the highest shapley ...
Jay's user avatar
  • 41
1 vote
0 answers
37 views

How to interpret SHAP summary plot when some features represent are all negative or positive values?

I've been working on a random forest model to estimate the probability of soil erosion and used SHAP to understand the feature contributions. Typically, I expect to see a mix of positive and negative ...
J.Han's user avatar
  • 11
0 votes
0 answers
19 views

ML models highest marginal impact to improve target variable

when looking at a single observation in a ML model, what is the best way to find which variables to change to make the biggest impact on the target variable? Example 1: in a house price prediction ...
citynorman's user avatar
8 votes
1 answer
443 views

Why can a model's SHAP values change on a new dataset?

Background I'm validating a model and as part of the process I've been calculating SHAP values for different validation datasets. I've calculated SHAP values for every sample in each dataset taken ...
Connor's user avatar
  • 635
0 votes
0 answers
76 views

Why are SHAP interaction values inconsistent with those from a linear model?

I have fit a gradient boosted regressor to some tabular data. When looking at dependence plots there are some clear interaction effects e.g. effect of gender on the outcome measure reverses dependent ...
RobMcC's user avatar
  • 253
0 votes
0 answers
16 views

DRF all features have positive contribution to SHAP values except one

I have trained a DRF model using h2o and the shap summary plot came out like this. Why aren't feature contributions centered? It seems weird that one feature contributes negatively and all the others ...
Pedro Schuller's user avatar
0 votes
0 answers
86 views

SHAP for text input: aggregating values across instances

I am working on a binary text classification task, where the input is text (~100 words long, but length varies). I am using a fine-tuned BERT-based model. My goal is to get insights about which ...
planetx's user avatar
1 vote
1 answer
43 views

How can I interpret variables in a bunch in machine learning?

I have 15 variables and 1 output and I have fitted a Random Forest Model. And then connected it to a SHAP intepretation framework. But, I want to find out the combined effect of three bunches of ...
maximusdooku's user avatar
0 votes
0 answers
86 views

Shapley Values: What is the permutation of a set?

Apologies if this is a very simple question--I am very new to Shapley values! I am reading through an article on Shapley values written by some of the original authors of the SHAP paper. While their ...
naveace's user avatar
  • 105
5 votes
1 answer
327 views

SHAP algorithm for feature selecion

I want to perform feature selection on my data. I have too many features, about 50 - 60, for not so much samples. Until today I was using the importance function of the ...
Programming Noob's user avatar
0 votes
0 answers
206 views

Why do Shap values get worse for some features as background data gets larger?

I'm trying to wrap my head around how the shap package in Python works. I'm experimenting with shap by calculating shap values ...
D I's user avatar
  • 11
1 vote
0 answers
17 views

Can I use Shapley values with metadata (i.e. information about observations that I didn't train my model on)?

I'm training a set of models (random forest/XGBoost) for an ordinal regression task. I'm (tentatively) planning to use Shapley values to infer feature performance. I also have some metadata that my ...
Neil's user avatar
  • 66
1 vote
0 answers
118 views

Calculate SD of SHAP values by using nested cross-validation

I follow a procedure as described in this paper (https://www.mdpi.com/2076-3417/12/13/6681). Thus, I calculate separate SHAP values for the training and test sets within each outer fold across ...
Frank Gallagher's user avatar
4 votes
2 answers
840 views

Shapley values for groups of correlated features

Is there a version of Shapley values that does not assume independence of features, and can be used to interpret importance of clusters of "similar" features (by adding individual feature ...
Merry's user avatar
  • 255
10 votes
1 answer
4k 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 ...
user1769197's user avatar
  • 1,194
1 vote
0 answers
787 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 ...
Alberto Perez Martinez's user avatar
4 votes
1 answer
1k 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 ...
shenflow's user avatar
  • 1,119
3 votes
1 answer
159 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 ...
dean's user avatar
  • 455
1 vote
1 answer
228 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 ...
Gee Buttersnapz's user avatar
1 vote
0 answers
179 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 ...
gknowme's user avatar
  • 21
0 votes
0 answers
1k 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 ...
jvukovic's user avatar
1 vote
0 answers
191 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 ...
g g's user avatar
  • 2,708
3 votes
0 answers
2k 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 ...
Chris's user avatar
  • 525
5 votes
1 answer
1k 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 ...
O.rka's user avatar
  • 1,462
1 vote
0 answers
135 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 ...
figs_and_nuts's user avatar
0 votes
0 answers
106 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, ...
Shivam Bindal's user avatar
1 vote
1 answer
124 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 ...
DimKoim's user avatar
  • 121
1 vote
1 answer
111 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 ...
Tim's user avatar
  • 11
1 vote
1 answer
527 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-...
titutubs's user avatar
  • 203
1 vote
0 answers
124 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 ...
Austin's user avatar
  • 11
2 votes
0 answers
1k 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 ...
Daniel's user avatar
  • 145
1 vote
0 answers
461 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 ...
sean1295's user avatar
4 votes
0 answers
541 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 ...
Marina W.'s user avatar
1 vote
1 answer
553 views

Can I combine Shapley scores?

I'm working in a context where some of the feature engineering on a dataset is done in one step of the pipeline and then different models are run on this feature engineered dataset. The problem is ...
roundsquare's user avatar
1 vote
0 answers
316 views

Should we prefer mean of absolute or square Shapley values?

Usually (for linear models at least) Shapley values are defined as deviations to some mean. By default, it seems the bar plot of the popular python package shap diplays the mean of absolute Shapley ...
matovitch's user avatar
  • 111
3 votes
1 answer
588 views

Can SHAP be used for linear mixed models?

Can SHAP importance be used for linear mixed models? I've seen it used for a variety of different modeling methods and was curious if it was possible to use it for linear mixed models? I am using the ...
Detr4's user avatar
  • 133
1 vote
0 answers
101 views

Appropriateness of using SHAP values to evaluate a model

I am a deep learning researcher that would like to use SHAP values to assess the relative importance of input features on the model's final score. Colleagues of mine have taken issue with the method ...
jlapin's user avatar
  • 31
2 votes
1 answer
5k views

Why SHAP base/expected value is 0.5 for all my instances?

I am working on a binary classification using random forest model, neural networks in which am using SHAP to explain the model predictions. I followed the tutorial and wrote the below code to get the ...
The Great's user avatar
  • 3,302
3 votes
1 answer
1k views

What is the use of expected value in machine learning models?

I see that we have a concept called expected value being used in machine learning (ML) models. For example, SHAP has a concept called Expected value. It means when ...
The Great's user avatar
  • 3,302