-1

I am working on a project where I need to provide a reason for every data row that gets a prediction from my Machine Learning Model. I am using a Logistic Regression Model (binary classification) to get my predictions and the cutoff threshold is 0.6. I have tried using SHAP and ELI5 to identify the most important features but this is globally for all the data points. I want to give a reason for every data point why it got classified as 1. I'm not really sure how to make it locally interpretable for humans to understand the prediction.

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

I think it could with some assumptions:

1. we use LR instead of NN
2. each variable "X" treated as binary variable

For LR equation:

y = 1/1+exp(-wi*xi)

As xi belongs to {0, 1}, we could think w_i as feature importance.

For each instance you mentioned, we could rank x_i by w_i, and find whether x_i in that instance is 0 or 1. Then the top 10 (maybe 50) x_i should be used for explanation.

linpingta
  • 2,324
  • 2
  • 18
  • 36
  • I want to make it more human interpretable, like how SHAP tells you what all features are more important while a prediction happens on the global dataset. I want something similar for each local point. – ajeevansh gautam Apr 20 '20 at 10:49
  • @ajeevanshgautam if you want something similar with something else, please do your research (the very first imperative in [How to ask](https://stackoverflow.com/help/how-to-ask)) and share it here by providing a *specific example*; in any case, yours is a good example of why such vague, general, and not adequately specified questions are not appropriate for SO. – desertnaut Apr 20 '20 at 12:42