Skip to content

Add consensus explanation walkthrough - #23

Merged
adaumsilva merged 3 commits into
adaumsilva:mainfrom
ruthraguru248:issue-4-consensus-tutorial
Oct 3, 2026
Merged

adaumsilva merged 3 commits into
adaumsilva:mainfrom
ruthraguru248:issue-4-consensus-tutorial

Conversation

@ruthraguru248

Copy link
Copy Markdown
Contributor

Closes #4

Changes

  • Added a consensus explanation walkthrough notebook.
  • Demonstrated local explanations with a Random Forest.
  • Added agreement matrix and explanation plots.
  • Demonstrated explanation disagreement with an MLP classifier.
  • Compared surrogate settings using different sample sizes.
  • Added global explanations with and without ground-truth labels.
  • Linked the new notebook from the README.

@adaumsilva adaumsilva left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for adding the walkthrough. All notebook code cells execute successfully, and all seven CI checks pass.

Before merging, please strengthen the disagreement example requested in #4. The current MLP example produces agreement scores of approximately 0.93 and 0.90, which the framework classifies as high agreement. It demonstrates that settings affect the result, but does not clearly illustrate disagreement between methods.

Please:

  • Choose a reproducible instance where the methods disagree more noticeably.
  • Explain which feature rankings differ, referring to the agreement matrix or individual explanations.
  • Compare the same instance after changing the surrogate settings and explain the observed effect. Agreement does not need to improve.

Please rerun the notebook from a fresh kernel and strip its outputs before committing. The remaining API examples and README link look good.

@adaumsilva

Copy link
Copy Markdown
Owner

Hello @ruthraguru248 your code looks good overall. I requested a small change, please address this change of the review before merging the PR.

@ruthraguru248

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I updated the walkthrough to use a reproducible instance with stronger disagreement and added a comparison showing the effect of increasing the surrogate sample size. I also reran the notebook from a fresh kernel and cleared the outputs.

@adaumsilva adaumsilva left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@ruthraguru248 Thanks for updating the disagreement example! All notebook code cells ran successfully, but the narrative in lines 219–223 still differs from the results I reproduced:

  • Agreement changes from approximately 0.24 to 0.18, rather than 0.90.
  • f8 remains the strongest positive feature.
  • f7 has a negative contribution.
  • Both explanations target class 0, not class 1.

Please rerun the notebook from a fresh kernel, update the narrative to match the actual results, and strip outputs before committing. Agreement does not need to improve—the decrease is also useful to explain.

@ruthraguru248

Copy link
Copy Markdown
Contributor Author

Thanks for the clarification. I corrected the narrative to match the reproduced results (0.24 → 0.18), including the feature contributions and class 0 target, reran the notebook from a fresh kernel, and cleared the outputs.

@adaumsilva
adaumsilva merged commit d4311d9 into adaumsilva:main Oct 3, 2026
7 checks passed
@adaumsilva

Copy link
Copy Markdown
Owner

Good job @ruthraguru248 ! PR Merged! Thanks for the contribution. Remember to start the repo if you didn't yet.

@ruthraguru248

Copy link
Copy Markdown
Contributor Author

Thank you so much, @adaumsilva! It was a pleasure contributing to your repository. I really appreciate the opportunity and enjoyed working on it.

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.

Tutorial notebook: reading a consensus explanation

2 participants