MAIF / shapash

🔅 Shapash: User-friendly Explainability and Interpretability to Develop Reliable and Transparent Machine Learning Models
https://maif.github.io/shapash/
Apache License 2.0
2.73k stars 334 forks source link

Add Customizable Graph Size, Improve Title Alignment, and Fix Color Palette Selection in Shapash Explainability Quality Graphs #609

Closed guillaume-vignal closed 4 days ago

guillaume-vignal commented 4 days ago

Fixes #610

Description:
This PR introduces enhancements and bug fixes to Shapash’s explainability quality graphs, improving flexibility in visual settings and resolving color display issues.

Changes Made

  1. Customizable Graph Dimensions

    • Context: Previously, the explainability quality graphs had fixed dimensions, limiting layout customization.
    • Changes: Added height and width parameters to pairwise_consistency_plot and associated methods, enabling users to specify graph size. Default values are set to height="auto" and width=1000, maintaining backward compatibility.
  2. Improved Title Alignment

    • Context: The title was not properly aligned, impacting readability.
    • Changes: Adjusted title placement using a line break <br> and improved styling for better positioning and readability.
  3. Color Palette Selection Fix

    • Context: An error in color palette selection caused inconsistent colors in the graphs, affecting interpretability.
    • Changes: Corrected the palette selection logic to ensure the chosen colors match the selected palette, ensuring consistent color display.

Additional Changes

Testing and Validation

Context and Impact

These updates make Shapash’s explainability quality graphs more adaptable to different visual needs and ensure clarity through consistent color display and improved title readability.