Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

issue #192: decouple visualisation from core explainability #203

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

christinaexyou
Copy link
Contributor

This PR address #192 by moving viz methods from the explainers module to following files:

  • visualizations/visualization_results.py: abstract class for visualization methods
  • visualizations/factory.py: gets visualization according to explanation method/class
  • visualizations/shap.py
  • visualizations/lime.py
  • visualizations/pdp.py
  • visualizations/distance.py

@christinaexyou
Copy link
Contributor Author

changes made:

  • moved all viz methods to seperate module visualizations
  • updated tests to reflect change

Copy link
Member

@ruivieira ruivieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I just added a comment inline about type hints for plot.
Also, perhaps the whole factory could go into visualizations/__init__.py to simplify the import (i.e. from trustyai.visualizations import plot).

But I'm fine with merging without these.

src/trustyai/visualizations/factory.py Outdated Show resolved Hide resolved
@christinaexyou
Copy link
Contributor Author

changes made:

  • renamed visualizations/factory.py -> visualizations/__init__.py
  • refactored tests to reflect change

@ruivieira ruivieira merged commit e6ea26a into trustyai-explainability:main Mar 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants