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

Comprehensive Fixes: Plot Title Overlap, Shortened Label Duplication, and Missing Files in Shapash Package #603

Closed guillaume-vignal closed 1 week ago

guillaume-vignal commented 1 week ago

Fixes: #601 Fixes: #602 Fixes: #600

Description:
This PR addresses three important issues in Shapash that were impacting the user experience. The following fixes are included:

  1. 601 :

    The plot title was overlapping the graph when custom height settings were used. This has been resolved by adding the "yref": "paper" parameter to the title configuration in Plotly plots, ensuring that the title is positioned relative to the entire plot and does not overlap the graph.

  2. 602 :

    In cases where feature names were long and needed to be shortened for readability, multiple labels could become identical, leading to missing rows or columns in the correlation matrix. This has been fixed by:

    • Adding a suffix (_2, _3, etc.) to any labels that become identical after shortening.
    • Improving the label shortening method to minimize the likelihood of label duplication by preserving more unique parts of the original label.
  3. 600 :

    Certain files required for report generation (specifically *.ipynb, *.html, and *.j2 files) were missing from the package distribution. The pyproject.toml has been updated to include these files in the distribution, ensuring that the report generation functionality works as expected.