Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Score of the surrogate model #452

Closed
garyee opened this issue Oct 8, 2021 · 6 comments · Fixed by #495
Closed

Score of the surrogate model #452

garyee opened this issue Oct 8, 2021 · 6 comments · Fixed by #495

Comments

@garyee
Copy link

garyee commented Oct 8, 2021

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 garyee changed the title Score of the surr Score of the surrogate model Oct 8, 2021
@imatiach-msft
Copy link
Collaborator

@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.

@gaugup
Copy link
Collaborator

gaugup commented Oct 13, 2021

@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,

@garyee
Copy link
Author

garyee commented Oct 26, 2021

@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.

@gaugup
Copy link
Collaborator

gaugup commented Jan 24, 2022

@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,

@SamiurRahman1
Copy link

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

@gaugup
Copy link
Collaborator

gaugup commented Mar 7, 2022

@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,

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants