Questions tagged [shap]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Decision Trees and SHAP Values

I've recently been using some (optimal) decision trees methods in R, such as 'evtree' and 'iai.' Both of these provide really nice interpretable plots. And out of the 12 covariates I have in my model, ...
0
votes
0answers
21 views

What is the difference between shap kernel-explainer and deep-explainer

I want to use shap to explain my image classification model. I read that it is better to use shap.DeepExplainer (than ...
0
votes
0answers
12 views

Samples to use when calculating SHAP values

I'm new to data science and I'm learning about SHAP values to explain how a Random Forest model works. I have an existing RF model that was trained on tens of millions of samples over a few hundred ...
1
vote
1answer
37 views

BorutaShap implementation

I want to use BorutaShap for feature selection in my model. I have my train_x as an numpy.ndarray and I want to pass it to the ...
0
votes
0answers
26 views

meaning of shapley values using SHAP

I have a binary classification - "BAD" and "GOOD" samples. The features are binary as well, either 0 or 1 (each sample is a boolean vector of size 264. I got about 3000 "BAD&...
0
votes
2answers
53 views

aggregation of feature importance

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. ...
0
votes
0answers
28 views

Shap after scikit pipeline - feature name

I'm using pipeline to transform data and predict model and I want to apply SHAP after that. However, when I apply it, it returns SHAP chart just fine, but the name of the feature are like feature 1, ...
0
votes
2answers
114 views

difference between feature effect and feature importance

Is there a difference between feature effect (eg SHAP effect) and feature importance in machine learning terminologies?
1
vote
1answer
321 views

How can interparet shap.summary_plot and its gray color concerning outliers/anomaly?

I inspired by this notebook, and I'm experimenting IsolationForest algorithm using scikit-learn==0.22.2.post1 for anomaly ...
0
votes
0answers
30 views

Shapley values for channel attribution equal to linear attribution

I am looking into Shapley values for online marketing attribution. In recent time many articles seem to have been made on this particular approach to attribution (there are more): https://medium.com/...
0
votes
0answers
28 views

Interpret messy SHAP summary plot for a Random Forest

I have the following plot and it shows SHAP values in a way I haven't seen anywhere. I have a small dataset (400 observations). I used SHAP for my other models and those have the more traditional ...
0
votes
0answers
164 views

LSTM Shapley Deep Explainer TimeseriesGenerator Keras

I have this data in the form: X_train shape: (2724, 10) , y_train shape: (2724,) X_test shape: (682, 10) , y_test shape: (682,) which I feed into Keras' ...
1
vote
1answer
38 views

Shapley value, conditional expectation vs reference point

In Shapley, the marginal contribution of a feature is computed by comparing the performance of a model with and without a feature over all possible subsets of features. A common choice is using the ...
1
vote
0answers
22 views

How marginal contributions of adding a variable in a model is calculated in determining SHAP feature importance?

I was trying to find feature importance using SHAP values in python for Isolation Forest. SHAP calculates the feature importance of a feature($i$) pertaining to a model($f$) for a datapoint($x$) using ...
0
votes
0answers
46 views

Is it possible that shap feature importance result will be more accurate than gain?

XGboost build the boosted tree in the following way: Each level of each tree (the phase of selecting the next feature with conditional value) selected according ...
1
vote
0answers
63 views

SHAP for Deep Neural Network taking long time

I have 60,000 samples with each having 1,800 features. I have made a multilayer perceptron in Keras and I want to use SHAP values to arrive at global feature importance. Is the matrix too big for SHAP?...
5
votes
1answer
268 views

How to achieve SHAP values for a CatBoost model in R?

I'm asked to create a SHAP analysis in R but I cannot find it how to obtain it for a CatBoost model. I can get the SHAP values of an XGBoost model with ...
0
votes
0answers
17 views

Are SHAP values additive across examples?

I understand that SHAP values have a property called additivity that means that if you add the SHAP value of each explanatory variable of a particular example to the average prediction of the model on ...
4
votes
1answer
482 views

Is it valid to compare SHAP values across models?

Let's say I have three models: a random forest with 100 trees a random forest with 1000 trees an xgboost model. I can rank the importance of my features on my dataset for each model using SHAP, and ...
1
vote
0answers
21 views

not getting point predictions from sagemaker clarify [closed]

I wanted to create shap values for my predictions in sagemaker. I found out that I can use "clarify" functionality in sagemaker to get shap values. However, I want to get point predictions ...
4
votes
1answer
1k views

Explanation of how DeepExplainer works to obtain SHAP values in simple terms

I have been using DeepExplainer (DE) to obtain the approximate SHAP values for my MLP model. I am following the SHAP Python library. Now I'd like learn the logic behind DE more. From the relevant ...
0
votes
0answers
22 views

Can I get a global attribution when using Shapley values?

I'm using a shap KernelExplainer to interprete my model and I'd like to display a global attribution for each feature. The idea is to represent, in a numerical way, the plot. What would be the best ...
2
votes
0answers
70 views

Shapley summary plot interpretation doubt?

I have question when interpreting SHAP summary plot. I have attached the sample plot Here, If I am interpreting it correctly, low values of feature 1 are associated with high and negative values for ...
0
votes
0answers
21 views

Explanation on how to interpret force_plot result by using SHAP

I have applied SHAP for explaining the outcome of my neural network. For the force_plot I have obtained the following output when trying to look at multiple ...
0
votes
0answers
324 views

How to tell which class is which with SHAP values in a summary plot?

I ran a random forest classifier to predict pollen color based on various environmental variables. The possible predictions are purple or yellow. I want to run a summary plot in shapely to get an ...
2
votes
0answers
226 views

How SHAP value explains contribution of features for outliers event?

I'm trying to understand and experiment with how the SHAP value can explain behaviour for each outlier events (rows) and how it can be related to shap.force_plot(). ...
0
votes
1answer
22 views

Shapley contribution when coalition is 0

I am exploring Shapley for channel attribution based on [here][1] Consider C1, C2, C3, C4 as 4 channels in question. Some of the coalition does not have value, such as ...
5
votes
1answer
139 views

Shapley values without intercept (or without `expected_value`)

I have a model and I want to derive its interpretability by using feature contributions. In the end, I want to have some contribution per feature such that the sum of contributions equals the ...
3
votes
1answer
2k views

How is the "base value" of SHAP values calculated?

I'm trying to understand how the base value is calculated. So I used an example from SHAP's github notebook, Census income classification with LightGBM. Right after I trained the lightgbm model, I ...
1
vote
0answers
108 views

Aggregate SHAP importances from different models

A couple of questions on the SHAP approach to the estimation of feature importance. I would like to use the random forest, logistic regression, SVM, and kNN to train four classification models on a ...
2
votes
0answers
293 views

Explain FastText model using SHAP values

I have trained fastText model and some fully connected network build on its embeddings. I figured out how to use Lime on it: complete example can be found in Natural Language Processing Is Fun Part 3: ...
1
vote
0answers
37 views

Can we use Shap to interpret output changes?

Can we calculate the difference between Shapley values to interpret changes in the output? More precisely, if we get Shapley values for two different inputs, can we compare them to understand how much ...
1
vote
0answers
33 views

Passing reduced/different feature data to LimeTabularExplainer compared to the original model

I am trying to use LimeTabularExplainer class and explain_instance function to find explainations of my LightGbm (lgb) model. However, the lgb model uses complex feature set which are not ...
2
votes
1answer
734 views

How to calculate joint feature contribution for XGBoost Classifier in python?

I referred to this beautiful document to research about joint feature contibutions. But this works only for RandomForest algorithms because of treeinterpreter (does ...
6
votes
2answers
2k views

SHAP value analysis gives different feature importance on train and test set

Should SHAP value analysis be done on the train or test set? What does it mean if the feature importance based on mean |SHAP value| is different between the train and test set of my lightgbm model? ...
0
votes
0answers
38 views

Ways to visualize the outcome of machine learning interpretability techniques (for image classification)

“Machine Learning Interpretability” or “Explainable Artificial Intelligence” has become quite popular in the machine learning community and in recent research. The goal is to make complex (deep ...
2
votes
1answer
491 views

Getting the positive impacting features using SHAP

I'm attempting to use SHAP to automatically extract feature names that have a positive impact on my regression models. On inspection of the code I see that the bar plot, for example, determines these ...
2
votes
1answer
61 views

treeExplainer algorithm intuition

I'm reading the paper about the treeExplainer; the pseudo-code of Algorithm 1 is a bit cryptical as most of the variables are not even defined (same with sampling and all details involved). Is there a ...
1
vote
0answers
40 views

Difference between shap values and feature contributions

I always found both concepts a bit confusing since they are quite similar. Would someone provide clear example where to apply each? Shap values ref: https://towardsdatascience.com/explain-your-model-...
1
vote
0answers
185 views

Tree Path Dependent expected value

I stuck on this topic for couple days and seems I need your help to understand what is expected value in TreeExplainer when feature_perturbation = tree_path_dependent, precisely what is expected value ...
0
votes
0answers
746 views

SHAP Kernel explainer for my pipeline model

I am trying to use SHAP kernel explainer to understand my XGBOOST model. My data is the lending club data and I am trying to predict the Grade of each customer. The data contains different types of ...