Skip to content

Add batch explanations and summary - #25

Merged
adaumsilva merged 4 commits into
adaumsilva:mainfrom
ruthraguru248:issue-2-batch-explanations
Oct 7, 2026
Merged

adaumsilva merged 4 commits into
adaumsilva:mainfrom
ruthraguru248:issue-2-batch-explanations

Conversation

@ruthraguru248

Copy link
Copy Markdown
Contributor

Add batch explanations and summary

Closes #2

Summary

  • Add support for explaining multiple instances with instances=
  • Support DataFrames, NumPy arrays, and lists of row indices
  • Add summarize() to produce a DataFrame of explanation results
  • Include prediction, target, top-3 features, attributions, and consensus agreement
  • Add tests for batch explanations and summarization

Testing

  • 96 tests passed
  • git diff --check passes

@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 batch explanations and summarization @ruthraguru248 ! I verified DataFrame, NumPy-array, and row-index inputs, empty batches, and summaries for explanations with fewer than three features. Existing single-instance and global behavior remains intact.

All 96 tests pass locally, and all nine CI checks pass. No blocking code issues found—approved.

Please also add the short README example requested in #2, showing explain(..., instances=...) followed by summarize(explanations), so users can discover the new API.

@ruthraguru248

Copy link
Copy Markdown
Contributor Author

Hi @adaumsilva, I’ve added the requested README example and resolved the README conflict. All CI checks are passing. Could you please re-review the PR?

@adaumsilva
adaumsilva merged commit 74759a5 into adaumsilva:main Oct 7, 2026
10 checks passed
@adaumsilva

Copy link
Copy Markdown
Owner

Solid work @prannoydidymus !

@ruthraguru248

Copy link
Copy Markdown
Contributor Author

Thank you sir ! Glad to contribute to the project.

@prannoydidymus

Copy link
Copy Markdown
Contributor

Thank you so much @adaumsilva , It was a plesure working with you.

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.

Batch explanations: explain many rows at once and summarise them

3 participants