I want to obtain SHAP values with kernel SHAP without using python but I don't really understand the algorithm. If I have a kNN classifier, do I have to run the classifier for all the coalitions possible? For $n$ variables, $2^n$ predictions?

Also, how do I obtain the SHAP values after that? Linear regression?

  • $\begingroup$ Hi and welcome to AI SE! What is a SHAP value? Are you referring to values produced by github.com/slundberg/shap? You should contextualize a little bit your problem. $\endgroup$
    – nbro
    Jun 5, 2020 at 14:59
  • $\begingroup$ thank you! yes, I am referring to that. I need to do it in MATLAB but I don't understandit quite well how to obtain those values $\endgroup$
    – sjv
    Jun 15, 2020 at 10:53


You must log in to answer this question.

Browse other questions tagged .