SHAP values for beginners | What they mean and their applications

  Рет қаралды 73,589

A Data Odyssey

A Data Odyssey

Күн бұрын

Пікірлер: 54
@adataodyssey
@adataodyssey 10 ай бұрын
NOTE: SHAP course is no longer free but you will still get the XAI course for free :) SHAP course: adataodyssey.com/courses/shap-with-python/ XAI course: adataodyssey.com/courses/xai-with-python/ Newsletter signup: mailchi.mp/40909011987b/signup
@fouried96
@fouried96 9 ай бұрын
Love to see a fellow South African in this line of work!
@adataodyssey
@adataodyssey 9 ай бұрын
Howzit! Will keep the videos coming :)
@fouried96
@fouried96 9 ай бұрын
@@adataodyssey Sweet! I followed you on linkedin for any other posts outside of KZbin. I was just curious, how does Ireland's grading system work for masters, I see you have a 1.1. I have no idea what that means having only studied in SA lol :P
@adataodyssey
@adataodyssey 9 ай бұрын
@@fouried96 that's 75% or above. They don't distinguish beyond that. The Irish are not so big on grading :D
@fouried96
@fouried96 9 ай бұрын
@@adataodysseyCongrats! I am busy following this SHAP series. I'm looking to find the best features for this kaggle comp for a multiclass classification problem where I'm using XGBoost. I was wondering, are you on Kaggle?
@innocentjoseph9084
@innocentjoseph9084 8 ай бұрын
Excellent explanation, just what I needed. Thank you.
@adataodyssey
@adataodyssey 8 ай бұрын
I’m glad you found it useful, Innocent :)
@lakshman587
@lakshman587 Жыл бұрын
This is a very clear video about shap!!
@aakritiiacharya
@aakritiiacharya Жыл бұрын
Hey Amazing explanation , I wanted to know more about the interpretation of SHAP Summary plot in terms of Survial Analysis
@adataodyssey
@adataodyssey Жыл бұрын
Thanks Aakriti! I don't know anything about survival analysis I'm afraid... If you are building models using well know packages (e.g. sklearn, XGBoost) then you should be able to use SHAP. I have this video on the more technical coding details. Let me know if that helps! kzbin.info/www/bejne/gmnCpImInad3grc
@RHONSON100
@RHONSON100 Жыл бұрын
wonderful explanation.
@adataodyssey
@adataodyssey Жыл бұрын
Thank you for the kind comment!
@hasnainayub2369
@hasnainayub2369 10 ай бұрын
Very well explained! I have a question regarding SHAP dependency plots. On the right-Y axis, SHAP selects a particular interacting feature by default and I know we can manually change the interacting feature. Does the default selection by SHAP explainer tell us that that particular feature is the feature that interacts with the main feature the MOST as compared to other features? In other words, can we say that the main feature depends on (or interact with) the default interacting feature while making predictions?
@adataodyssey
@adataodyssey 9 ай бұрын
Yes, I wasn't aware of this but it seems like it is true: shap-lrjball.readthedocs.io/en/latest/example_notebooks/plots/dependence_plot.html
@satk4211
@satk4211 8 ай бұрын
Excellent video ❤❤❤❤❤❤
@adataodyssey
@adataodyssey 8 ай бұрын
Thank you ☺️ I’m glad it could help
@Jihaoui
@Jihaoui 2 ай бұрын
Very good explanation
@adataodyssey
@adataodyssey 2 ай бұрын
Thanks Jhaoui!
@kandiahchandrakumaran8521
@kandiahchandrakumaran8521 Ай бұрын
Excellent videos. Well done. I have 2 questions. (1) Is SHAP unsupervised learing? and (2) Can it be used for time-to event (Survival), where there are censored data, analysis? Many thanks.
@adataodyssey
@adataodyssey Ай бұрын
Thanks! (1) No, SHAP is not model so it is not supervised or unsupervised learning algorithm. It is a method used to explain a model. (2) I'm not familiar with this usecase. But SHAP can be used whenever you have input variables, a function and output. Where you want to explain the contributions each of the input variables to the output. In the context of predictive machine learning, you can use SHAP to explain the contributions of each model feature to a prediction.
@kandiahchandrakumaran8521
@kandiahchandrakumaran8521 Ай бұрын
@@adataodyssey Thank you for your prompt reply and advice. Best wishes.
@emirhan2884
@emirhan2884 Ай бұрын
thank you for the great explanation! though I would've expected the sum of shapley values to be smaller than 1 for a classification problem. am I missing something?
@adataodyssey
@adataodyssey Ай бұрын
For classification problems, shapley values are interpreted in terms of log odds. See this video for more details: kzbin.info/www/bejne/aKnPmIKrZ5eMnac
@dantedt3931
@dantedt3931 8 ай бұрын
This is awesome!
@adataodyssey
@adataodyssey 8 ай бұрын
Thanks!
@statistikochspss-hjalpen8335
@statistikochspss-hjalpen8335 Жыл бұрын
Does it have to be about prediction? I just want to understand which features/independent variables are most important when my independent variables are highly correlated. I've heard people talking about "contribution".
@adataodyssey
@adataodyssey Жыл бұрын
No, you can also interpret a model used for analysis. In ML, when we say "prediction" we mean the output of the model. We use this term even if we are not trying to predict the future.
@shubhanshisinghms7745
@shubhanshisinghms7745 7 ай бұрын
Can you make a video on how recruitment decision is made?
@adataodyssey
@adataodyssey 7 ай бұрын
Do you mean how automated decisions are made or decisions for data scientists in general?
@youtubeuser4878
@youtubeuser4878 8 ай бұрын
Hello. Thanks for the tutorial. Regarding your XAI and SHAP courses, is there an order to how we should take the courses. Should we take the XAI before SHAP or vice versa. Thanks
@adataodyssey
@adataodyssey 8 ай бұрын
No problem! It is better to take XAI first then SHAP. XAI covers more of the basics in the field and other useful model agnostic methods. But the SHAP course still gives some basics so it is not necessary to do the entire XAI course (or even any of it) if all you care about it learning SHAP :)
@youtubeuser4878
@youtubeuser4878 8 ай бұрын
@@adataodysseyAwesome. Thank you.
@SourodeepDas-o3q
@SourodeepDas-o3q 11 ай бұрын
If I have one hot encoded on the categorical values, How should I know which main features are contributing ?
@adataodyssey
@adataodyssey 11 ай бұрын
This is a great question! You have two options (see the articles below). Either you can add up the SHAP values for the individual one-hot encodings or use CatBoost. I also go over these concepts in more detail in my course. towardsdatascience.com/shap-for-categorical-features-7c63e6a554ea?sk=2eca9ff9d28d1c8bfde82f6784bdba19 towardsdatascience.com/shap-for-categorical-features-with-catboost-8315e14dac1?sk=ef720159150a19b111d8740ab0bbac6d
@keivansamani3437
@keivansamani3437 11 ай бұрын
I want to be able to understand how the features affect the predictions along a 2D curve where the points are sequential, but it seems SHAP is only useful when there’s a single prediction not a curve :(
@adataodyssey
@adataodyssey 10 ай бұрын
You could try using PDPs or ICE Plots for this. Or aggregate SHAP values using a dependence plot
@javierclement3047
@javierclement3047 29 күн бұрын
Can you explain your problem more? Predictions along a 2D curve? What’s the problem you’re looking at?
@keenanosullivan305
@keenanosullivan305 Жыл бұрын
Shap means something a little different in South Africa. Love the content though👍🏼
@adataodyssey
@adataodyssey Жыл бұрын
Haha shap shap bra!
@mahdihabibi6382
@mahdihabibi6382 11 ай бұрын
How can we determine which interpretable models are appropriate for our deep learning models? For example, I have a CNN model for Malaria prediction, however, I am unsure whether LIME or SHAP is a better tool for interpreting my model. Could you please guide me through this situation?
@adataodyssey
@adataodyssey 10 ай бұрын
For deep learning, you might want to look into a model specific method such as gradcam. Are you using images or tabular data? If you are using tabular data, I would change the model to XGBoost or random forest. Then use both LIME and SHAP. There are also other methods like ALEs, PDPs, ICE Plots and Freedman's H-statistic. It is also a good idea to use multiple methods.
@mahdihabibi6382
@mahdihabibi6382 10 ай бұрын
Thank you for your reply. @@adataodyssey
@teguhprasetyo7505
@teguhprasetyo7505 10 ай бұрын
Can this method be applied in multilabel classification?
@adataodyssey
@adataodyssey 10 ай бұрын
Yes! I have a video on this exact topic: kzbin.info/www/bejne/aKnPmIKrZ5eMnac&lc=UgwSqpAiiG_ho6hDqDd4AaABAg
@mustafayldz2200
@mustafayldz2200 26 күн бұрын
I cannot use Shap and LDA together, I am experiencing an index error.
@mustafayldz2200
@mustafayldz2200 26 күн бұрын
could someone help me
@adataodyssey
@adataodyssey 25 күн бұрын
Hi Mustafa, it's not possible to solve your problem based on the information you provided. What package are you using? Are there any other example of where SHAP has been implemented for that package?
@weii321
@weii321 Жыл бұрын
Can shap value used for feature selection?
@adataodyssey
@adataodyssey Жыл бұрын
Yes! You can use the mean SHAP plot. I discuss it in this video: kzbin.info/www/bejne/gmnCpImInad3grc
@weii321
@weii321 Жыл бұрын
@@adataodyssey Thank you for your answer. I have another question, what is the difference between using SHAP values compared to using feature importance for feature selection? Does using SHAP values improve the model's performance more?
@aneesha123able
@aneesha123able Жыл бұрын
👏
@fupopanda
@fupopanda 6 ай бұрын
Jumping between what you are explaining and yourself is distracting
@adataodyssey
@adataodyssey 6 ай бұрын
Thanks for the feedback!
SHAP with Python (Code and Explanations)
15:41
A Data Odyssey
Рет қаралды 71 М.
The mathematics behind Shapley Values
11:48
A Data Odyssey
Рет қаралды 32 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 14 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 19 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Shapley Values : Data Science Concepts
15:03
ritvikmath
Рет қаралды 51 М.
Understand ANY Machine Learning Model
15:00
CodeEmporium
Рет қаралды 30 М.
Interpretable Machine Learning - Shapley - Shapley Values for Local Explanations
22:46
Statistical Learning and Data Science
Рет қаралды 333
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4 МЛН
How He Got $600,000 Data Engineer Job
19:08
Sundas Khalid
Рет қаралды 176 М.
Shapley Additive Explanations (SHAP)
11:52
KIE
Рет қаралды 65 М.
Visualizing transformers and attention | Talk for TNG Big Tech Day '24
57:45
All Machine Learning algorithms explained in 17 min
16:30
Infinite Codes
Рет қаралды 414 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН