How SHAP value is calculated? It is not hard! (simple example)

Поділитися
Вставка
  • Опубліковано 14 чер 2024
  • This video explains how to calculate a Shapley value with a very simple example. The Shap calculation based on three data features only to make this example as simple as possible. Also, you will be introduced to a main Shapley value formula, where we will calculate weights and marginal contributions.
    The Shapley value is a solution concept used in game theory that involves fairly distributing both gains and costs to several actors working in coalition. Game theory is when two or more players or factors are involved in a strategy to achieve a desired outcome or payoff.
    In many cases, the Shapley value can be replace a standard feature importance calculations provided by Scikit-learn, because the Shapley value can explain how the feature's values can impact the final prediction, and by how much they contributes to the Machine Learning predictions.
    The video explains the Shapley value calculation by involving you to a simple example, where you analyze how Google Ads, Social Media, and Email marketing contributes. to prediction - if a user click on Ad, or not.
    Shap value also ofter used in Explainable AI (XAI) to explain results to the business and understand the reasonings behind the ML models in terms of predictions and model performance.
    The content of the video:
    0:00 - What is a Shapley value and how to explain it?
    2:14 - Simple Shapley value calculation example
    3:00 - Understand Marginal Contributions for Shap
    6:35 - Shap formula
    7:13 - Calculate Marginal Contributions for Shap
    11:20 - Calculate Weights for Marginal Contributions
    13:31 - Calculate the final Shapley value
    14:17 - Final summary of calculation results
    Read more:
    - Official Shap documentation: shap.readthedocs.io/en/latest...
    - Medium post: SHAP: Explain Any Machine Learning Model in Python (towardsdatascience.com/shap-e...)
    #shap #explainableAI #shapley
  • Наука та технологія

КОМЕНТАРІ • 29

  • @DataScienceGarage
    @DataScienceGarage  2 роки тому +4

    Thank you for watching this video. I really appreciate it.
    If you liked this explaining video, I also recommend to check it out other similar videos from my channel below:
    1. Compare ML Models in few clicks with PyCaret in Python - ua-cam.com/video/s38AvnzwKPw/v-deo.html
    2. Kubernetes Explained | High Level Explanation - ua-cam.com/video/7yytUBC8grw/v-deo.html
    3. Calculate TF-IDF in NLP (Simple Example) - ua-cam.com/video/vZAXpvHhQow/v-deo.html
    4. How Gradient Descent Works. Simple Explanation - ua-cam.com/video/Gbz8RljxIHo/v-deo.html

  • @senumamit
    @senumamit 10 місяців тому +1

    Clear and precise explanation! Thank you so much! Loved it!

    • @DataScienceGarage
      @DataScienceGarage  10 місяців тому +1

      You are welcome. Thank you for watching, appreciate!

  • @AJMJstudios
    @AJMJstudios Рік тому +2

    Good example. I would suggest though making the distinction between Shapley values and the SHAP calculation more clear, the title is a little misleading.

  • @smithanair787
    @smithanair787 Рік тому +2

    Great explanation! Never understood this clearly from other sources!! Well done!

    • @smithanair787
      @smithanair787 Рік тому

      If in another video, if you can show how this translates to the mathematical equation for Shapley values, it will be awesome!

    • @DataScienceGarage
      @DataScienceGarage  Рік тому

      Thanks for feedback, I really appreciate that you found that useful! :)

    • @DataScienceGarage
      @DataScienceGarage  Рік тому

      About - translate to the math. equation - good idea. I will read more about that. :)

  • @MS-ew2ru
    @MS-ew2ru Рік тому +1

    Excellent video! That was very helpful, thank you!

  • @edmar_santos
    @edmar_santos Рік тому

    Thanks a lot! This explanation was very helpful!

  • @jamalnuman
    @jamalnuman 3 місяці тому

    the is the best of the best. Many thanks for the efforts

  • @Poom006
    @Poom006 2 місяці тому

    Great explanation ❤

  • @umarkhan-hu7yt
    @umarkhan-hu7yt 3 місяці тому +1

    I never see such a clear explanation on Shaley values.

  • @mohamedezzat5048
    @mohamedezzat5048 Рік тому

    Excellent explanation

  • @ssrestore
    @ssrestore 11 місяців тому

    Very nice video. It would be nice if the weight you have used could be related to the original shap formula involving factorials.

  • @encryptionalgorithm
    @encryptionalgorithm Рік тому +3

    Thanks for the explanation, I have a quick remark w.r.t. the calculation done at 00:11:03
    MC1 ==> OK
    MC2 / MC3 and MC4 the labels (definition) and the calculations do not align.

  • @himanshubeniwal
    @himanshubeniwal 6 місяців тому

    Thanks for the informative video!

  • @thomaskuttyreji2845
    @thomaskuttyreji2845 Рік тому

    Thanks a lot

  • @utsabshrestha673
    @utsabshrestha673 Рік тому

    Well explained!

  • @user-sy1mn9cd5t
    @user-sy1mn9cd5t 2 місяці тому

    Thank you so much

  • @tagheuer001
    @tagheuer001 Рік тому +1

    One suggestion, since you pronounce v as w, it's a good idea to just pronounce v's as f's. "falues" is much better than "walues" f an v are so close anyway and I heard you say may f-words clearly.