Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
162 views

I am following the documentation of the shapr package (version 1.0.5) to use parallelization, but whatever number of "workers" I specify, future always uses all available processor cores. ...
cdalitz's user avatar
  • 1,371
0 votes
0 answers
50 views

I wrote a code for SHAP on images. It was working for two days, then it brought following error : module 'shap' has no attribute 'DeepExplainer' I uninstalled and installed the SHAP module again and ...
Samaneh Rezaei's user avatar
2 votes
2 answers
82 views

I am sorry to ask this question again (first attempt here: shapvix sv_dependence color_var based on same feature), but it was closed because not enough details were provided. Below is an updated ...
kris's user avatar
  • 187
2 votes
1 answer
118 views

I have a machine learning model and I calculated SHAP on it using following code: import shap background = shap.kmeans(X_dev, k=100) explainer = shap.TreeExplainer(model, feature_perturbation="...
Adarsh Wase's user avatar
  • 1,931
0 votes
0 answers
69 views

I'm encountering an issue when applying SHAP (SHapley Additive exPlanations) to my model predictions. Specifically, when I use shap.TreeExplainer with a RandomForestClassifier, I get the following ...
Aymaneos's user avatar
0 votes
0 answers
117 views

I am trying to obtain the SHAP values of a Random Forest model for binary classification, trained in Python. I am using the following code: final_model = RandomForestClassifier(random_state=42, **...
a12456's user avatar
  • 1
-2 votes
1 answer
202 views

I am currently working on a project that needs me to calculate the Shapley values of players that enter into a coalition. I've written up the value function, but was wondering if there was a way to ...
Trev's user avatar
  • 21
1 vote
2 answers
256 views

I am running the demo code provided here. But I do not get the same plots with the nice coloring and highlights. Here is how it looks like in the source notebook: Here is how mine looks like I am ...
SaTa's user avatar
  • 2,800
0 votes
0 answers
29 views

I'm having a lot issues implementing shap plot for my SGC model. Any one experienced the problem the same problem ,can give an example. The problem is that there are a lot errors when try shap with ...
zakaria bouchelaghem's user avatar
0 votes
1 answer
382 views

Im running a random forest model and to get some feature importance and Im trying to run a SHAP analysis. The problem is that every time I try to plot the shap values, I keep getting this error: ...
Starterkit07's user avatar
0 votes
1 answer
171 views

I am trying to explain my xgboost (v 2.1.1) model with shap (v 0.42) but I get this error: UnicodeDecodeError Traceback (most recent call last) Cell In[53], line 1 ----> 1 ...
Christin Abel's user avatar
0 votes
0 answers
50 views

I have written this code to measure SHAP values and plot feature importance. However, I got an error when plotting the shape values. I used the gen_GRU_model_179.h5 generated model, my model expects a ...
Foha2001's user avatar
0 votes
0 answers
21 views

I am doing XAI for the input occluded image using a pretrained ArcFace model to find the occluded area of the image and plot the PLQ map. Here for XAI, I have used shap library in python. I have using ...
Saran Babu's user avatar
1 vote
0 answers
170 views

Before one-hot encoding, the input data consists of 2 categorical columns (category1, category2). category1 is among A,B,C and category2 is among X,Y. After the one-hot encoding, the input data ...
Hyunjik Bae's user avatar
  • 2,969
1 vote
2 answers
120 views

I am attempting to utilize the Treeshap package to calculate SHAP values. However, I encountered an error when trying to apply it to models created using the mlr3 framework. Specifically, I am unsure ...
gen linlin's user avatar
1 vote
0 answers
315 views

I am trying to predict the occurrence of a certain phenomenon using about 9500 persons’ data with 36-37 predictor items using sklearn. It is a binary classification problem (occur or not-occur). ...
user avatar
1 vote
1 answer
189 views

Some of the data labels of the SHAP waterfall plot that I get are equal to zero. However, they are not and the plot itself rounds them. Therefore, I need to increase the decimal places of the labels. ...
PW14's user avatar
  • 37
1 vote
0 answers
95 views

I'm developing a transformer-based regression model using a classification model with num labels set to 1 so that it can be used for regression. from transformers import AutoTokenizer, ...
Gevin Hasmitha's user avatar
0 votes
0 answers
93 views

I'm creating an Explanation object using SHAP. This object holds shap values, base values and the actual data. My problem is that the shap value array in the explanation object comes in a shape that ...
Henri's user avatar
  • 1,255
0 votes
0 answers
78 views

I have some problems with shap (python) in Google Colab notebook; I want to use ResNet50 with CIFAR100 dataset with Partition explainer; I get a session crash but I don't understand exactly why: Here ...
doog_math's user avatar
2 votes
0 answers
221 views

So I trained my model and here I can share some relevant parts regarding the issue: import pandas as pd import pickle from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.ensemble ...
idkrlly's user avatar
  • 41
1 vote
1 answer
402 views

I want to plot the SHAP values for my RSF model; here is the code and error: xvars <- c("RIDRETH1", "RXDLIPID", "DRXTKCAL", "DRXTPROT", "DRXTCARB", ...
mtvpr's user avatar
  • 11
1 vote
1 answer
88 views

I trained a two-classification model and wanted to use shap.Explainer to analyze feature contribution. The code was: def f(x): return model.predict_proba(x)[:, 1] X100 = shap.utils.sample(X_train,...
rzy's user avatar
  • 21
0 votes
1 answer
187 views

I have a dataset with missing data. They are encoded as NaN. This is fine for model fitting with XGBoost. When I want to understand the model, analyzing model importance with SHAP scatter plots, I am ...
LudvigH's user avatar
  • 4,934
1 vote
0 answers
92 views

I am trying to reproduce the following example with the latest version 0.46.0 of SHAP open source. However, it seems to be weird that the result is not a bar chat as in the example. My attempt: Then, ...
Tung Nguyen's user avatar
2 votes
1 answer
349 views

Python in Excel includes some packages in the Anaconda distribution. +info, anaconda distribution packages. However, is it possible to install additional packages that are still in the Anaconda ...
FZNB's user avatar
  • 2,823
0 votes
0 answers
62 views

I have used shap on my Bangla dataset and plotted bar graph with following code: pred = transformers.pipeline("text-classification", model=model, tokenizer=tokenizer, device=0, ...
Tanjim Taharat Aurpa's user avatar
0 votes
1 answer
286 views

I have trained an XGBoost model using caret and now, I am calculating the mean SHAP value of each predictor using the package SHAPforxgboost, using the following code: library(SHAPforxgboost) ...
a12456's user avatar
  • 1
1 vote
0 answers
58 views

import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import pandas as pd import os from datetime import datetime from sklearn.preprocessing import StandardScaler,MinMaxScaler,...
Tetsuya's user avatar
  • 13
1 vote
1 answer
427 views

I want to represent a dataset with the SHAP values of each entry (I am not interested in the actual data, but rather its importance). To calculate SHAP values I use an XGBoost model. model = xgboost....
blazspaca's user avatar
0 votes
1 answer
124 views

I have been trying to change the colors of the points on each variable, but even though i've tried using scale_x_discrete, by and changing the colors, or using scale_color_manual(), nothing works for ...
Vicente Santana's user avatar
2 votes
1 answer
350 views

I train a linear model to predict house price, and then I compare the Shapley values calculation manually vs the values returned by the SHAP library and they are slightly different. My understanding ...
Sole Galli's user avatar
  • 1,144
0 votes
0 answers
168 views

I have a small dataset with 816 rows and 8 numerical features. The target variable is categorical, with 4 different categories. I trained a XGB model on the dataset and after that I try to use SHAP ...
Mobius88's user avatar
  • 111
0 votes
0 answers
198 views

I want to do a SHAP analysis of a model. The model is a RNN that takes a whole timeseries as input, where every time series is in the format (101, 12). However, the SHAP package won't accept 3-...
user26420675's user avatar
2 votes
0 answers
87 views

Context Let's imagine I am interested in predicting sepal length in the iris dataset using catboost. Objective My main objective is understanding the effect of each categorical value for target in the ...
Carles's user avatar
  • 2,847
0 votes
1 answer
625 views

I was trying to interpret my binary classification model using the SHAP value for each feature. I am wondering: Does the positive SHAP value mean the feature contributed more to predicting the "1&...
klklklkl's user avatar
1 vote
1 answer
1k views

I have a dataset which contains roughly 50,000 observations. I want to compute the Shapley value using KernelExplainer after estimating an ElasticNet for regression. Is there any reference or rule ...
pallidness's user avatar
0 votes
0 answers
67 views

I built a soft voting model and wanted to calculate the feature contribution for an individual prediction. However, I found discrepancies in the result between the feature contributions calculated by ...
Tky02's user avatar
  • 1
0 votes
0 answers
76 views

In the context of machine learning on python, regression or classification whatever, I sometimes do the ratio of two features to make a third feature and drop the first two. For example: ...
Melvin BARBAUX's user avatar
1 vote
0 answers
106 views

I want to recreate the SHAP Summary Plot with the help of the plotly library. I found this beautiful post: https://community.plotly.com/t/shap-like-bee-swarm-plots/68015 But I have no idea how the ...
Julia Julchen's user avatar
1 vote
1 answer
272 views

I am using a mtcars dataset and tune an xgboost model to predict mpg # Load required packages library(tidymodels) library(xgboost) library(DALEX) library(DALEXtra) # Load example data data(mtcars) # ...
Jacek Kotowski's user avatar
1 vote
0 answers
230 views

Initially when I tried to work with KernelExplainer, it won't work as dimension of my dataset is (no. of samples, 186, 1). I saw from few forums that KernelExplainer won't work(correct me if i am ...
sandun herath's user avatar
1 vote
0 answers
46 views

I compiled, fit the CNN LSTM model. normalized_train_data is my whole dataset, which I have split to training and test set. I want to see features' contribution by running shpaley test. The code even ...
Astronaut's user avatar
0 votes
1 answer
375 views

I'm using the {shapviz} package and I would like to plot a waterfall plot with only 5 categories, but without the "other features" category (which refers to the sum of the other features). ...
Ornella Scardua's user avatar
1 vote
1 answer
234 views

I am using rfsrc in Rstudio to run my bioinformatics data (included survival status and time), and I developed my competing risks model. Although I have generated my result with nested cross ...
陈德赛's user avatar
0 votes
0 answers
267 views

I have trained a two-stage ML model training for binary classification. In the first stage, I applied an autoencoder model consisting of encoder and decoder. The encoder model has reduced the ...
Sultan Ahmed's user avatar
  • 2,230
1 vote
0 answers
292 views

What I do: I analyse different biomarkers from EEG data with the help of different machine learning algorithms and different pre-processing steps etc. This results in several models for each ...
Zachai's user avatar
  • 21
1 vote
2 answers
294 views

I'm using the shap library for python and pretending to use it with a couple of machine learning models. I'm just a beginner in all of this. I have been trying to represent the beeswarm plot to ...
Bea González's user avatar
1 vote
1 answer
632 views

Hi i would like to Show side by side diagrams from SHAP Library: Waterfall Diagram :API Reference https://shap.readthedocs.io/en/latest/generated/shap.plots.waterfall.html#shap.plots.waterfall Bar ...
Jack's user avatar
  • 13
0 votes
1 answer
189 views

I'm starting to use shap values with pytorch. For this, I just tried to run an easy example but I get an error. The code is: import numpy as np import torch from torch import nn, optim from torch.nn ...
Bea González's user avatar

1
2 3 4 5
10