interpretml / interpret-community

Interpret Community extends Interpret repository with additional interpretability techniques and utility functions to handle real-world datasets and workflows.

Home Page:https://interpret-community.readthedocs.io/en/latest/index.html

Repository from Github https://github.cominterpretml/interpret-communityRepository from Github https://github.cominterpretml/interpret-community

Score of the surrogate model

garyee opened this issue · comments

Is your feature request related to a problem? Please describe.
Is there a way to compute a score (like R-squared) for the output of the surrogate model?
I would like to know if I can trust the explanations given by the surrogate or if I should be careful.

Describe the solution you'd like
It would be great if there would be a score property in GlobalExplanation and a parameter when creating the explainer to pass in a custom score function.

@garyee great point. It's already possible to get the replication score here:

def _get_surrogate_model_replication_measure(self, training_data):

However this needs to be turned into a public API and integrated with our explanation and dashboard, so it's always shown for explanations from mimic explainer.

@garyee , how do you plan to use this score? Like comparing the various surrogate models used with MimicExplainer? If that is the case, could you try the above private function to see if this helps your scenario?

As Ilya mentioned we could turn this into a public function and add to an interpret notebook.

Regards,

@gaugup , that would be a possible scenario. I would like to get the score to know how good the explanations of the surrogate model are ... how close the surrogate model is to the underlying "black box" model.
I am planning a comparison with other explainability methods on the same dataset and black box model.

@imatiach-msft I did not catch that method there. It would be great if it could be exposed.

@garyee, I have created #495 to make the function _get_surrogate_model_replication_measure() public. I will also add the usage of this function to one of the notebooks.

Let me know if you would need anything else to be done for this function.

Regards,

Hi! has the function been used in any of the notebooks yet? :)

@SamiurRahman1, @garyee , there a new notebook in the PR #506 which uses the above function. If you plan to use the notebook in the PR, then do let us know if you would want to add anything to the notebook.

Regards,