lime
lime copied to clipboard
Calculate r2 score
Is it possible to calculate the r2 score of the surrogate model? Can this feature be added?
did you solve this issue in any way?
no. unfortunately not.. :(
Hello
This is a pretty easy thing to do since it has been implemented before in this library. To find the r2 score of the surrogate model you can use the score parameter that is returned from the explain_instance method. It's actually the r2 score of the surrogate model (which is by default the ridge regression).
To do it
explanation = explain_instance(data, ... and some parameters)
print(explanation.score)