Add Contributions Projection Plot to the Shapash HTML Report

Open
#649 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 10 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
html, machine-learning, python

Research direction

Reuse the existing contributions_projection_plot from SmartPlotter and embed three colorings (prediction, true values, prediction error) into the HTML produced by SmartExplainer.report. Start by locating how other plots (true vs predicted, feature importance, local explanations) are added to the report, then wire the new plot the same way. Done when the static report includes the three comparable projection views without requiring the WebApp.

Written by the indexing model from the issue text.

Description

enhancement
Description

The new contributions_projection_plot visualization projects each instance’s Shapley values into a 2D space, offering deep insight into why predictions are correct or incorrect.

Currently, the Shapash Report (generated via SmartExplainer.report) includes plots such as:

  • True vs Predicted plots,
  • Feature importance,
  • Local explanations.

However, it does not yet include the Contributions Projection Plot, which could add significant value to static model analysis.

Feature Proposal
  • Integrate the Contributions Projection Plot into the Shapash HTML report.

  • Include three versions of the plot (or a toggle):

    1. Projection colored by prediction (or probability score).
    2. Projection colored by true values.
    3. Projection colored by prediction error.
  • Allow users to visually compare these plots to identify clusters of well/poorly predicted instances.

Expected Benefits
  • Provide a static yet rich view of the Shapley-based projections for stakeholders who consume the report without using the WebApp.
  • Make it easy to identify zones of high error or unusual behavior without running live code.
Implementation Notes
  • Reuse the contributions_projection_plot logic from SmartPlotter.
  • Embed them into the HTML report.
Dominant language
Jupyter Notebook
Stars
3.3k
Forks
390
Avg merge
7d 15h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MAIF/shapash

All issues in MAIF/shapash

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.