Skip to content

Add Contributions Projection Plot to the Shapash HTML Report #649

@guillaume-vignal

Description

@guillaume-vignal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions