You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plot displays a SHAP summary visualization with 15 features on the y-axis, sorted by importance from top (mean radius) to bottom (smoothness error). Each row shows scattered dots representing individual samples, positioned horizontally by their SHAP values ranging from approximately -0.3 to +0.3. The dots are colored using a diverging blue-to-red color scheme (RdBu_r) where blue indicates low feature values and red indicates high feature values. A clear vertical black line at x=0 separates positive and negative SHAP impacts. The title "shap-summary · plotly · pyplots.ai" is centered at the top. A colorbar on the right shows the feature value scale from Low to High. The background is white with subtle gray gridlines.
Quality Score: 91/100
Criteria Checklist
Visual Quality (37/40 pts)
VQ-01: Text Legibility (10/10) - Title at 28pt, axis labels at 22pt, tick labels at 16-18pt - all perfectly readable
VQ-02: No Overlap (8/8) - No overlapping text, feature names well-spaced on y-axis
VQ-03: Element Visibility (7/8) - Markers sized appropriately (size=8) with 0.7 alpha for 200 samples; jittering prevents complete overlap
VQ-04: Color Accessibility (5/5) - RdBu_r diverging colorscale is colorblind-friendly
VQ-05: Layout Balance (4/5) - Good margins (200px left for feature names), plot uses canvas well but some empty space at bottom
VQ-06: Axis Labels (2/2) - Descriptive labels: "SHAP Value (Impact on Model Output)" and "Feature"
VQ-07: Grid & Legend (1/2) - Grid is subtle (alpha 0.2), colorbar well-placed, but no traditional legend needed
Spec Compliance (25/25 pts)
SC-01: Plot Type (8/8) - Correct SHAP summary beeswarm-style plot
SC-02: Data Mapping (5/5) - SHAP values on x-axis, features on y-axis, color by feature value
SC-03: Required Features (5/5) - Vertical line at x=0, diverging color scale, sorted by importance, jittering applied
SC-04: Data Range (3/3) - All data visible within axes
SC-05: Legend Accuracy (2/2) - Colorbar correctly labeled with Low/Medium/High
SC-06: Title Format (2/2) - "shap-summary · plotly · pyplots.ai" matches required format
Data Quality (17/20 pts)
DQ-01: Feature Coverage (6/8) - Shows positive and negative SHAP values, varying importances, but correlation between feature value and SHAP is somewhat uniform across features
DQ-02: Realistic Context (7/7) - Uses breast cancer diagnostic feature names (radius, texture, perimeter, etc.) - realistic ML interpretability scenario
DQ-03: Appropriate Scale (4/5) - SHAP values in reasonable -0.3 to +0.3 range, feature values simulated realistically
Code Quality (9/10 pts)
CQ-01: KISS Structure (3/3) - Linear script: imports → data → plot → save
CQ-02: Reproducibility (3/3) - np.random.seed(42) set
CQ-03: Clean Imports (2/2) - Only numpy and plotly.graph_objects used
CQ-04: No Deprecated API (0/1) - Using dict syntax instead of go.Layout() is fine, but hovertemplate uses normalized color value instead of actual feature value
CQ-05: Output Correct (1/1) - Saves as plot.png and plot.html
Library Features (3/5 pts)
LF-01: Uses distinctive library features (3/5) - Uses go.Scatter with custom colorscale, add_vline, interactive hover templates, and HTML export. Could have used animation or subplot features more distinctively.
Strengths
Excellent implementation of the SHAP summary visualization concept with proper beeswarm-style jittering
Correct blue-to-red diverging colorscale (RdBu_r) for feature values as specified
Clear vertical reference line at x=0 separating positive/negative impacts
Well-organized code with realistic breast cancer dataset feature names
Appropriate marker sizing and transparency for 200 data points
Interactive hover templates provide additional information on interaction
Weaknesses
Hover template shows normalized feature value (0-1) instead of actual feature values which would be more informative
The grid styling is functional but could use slightly more prominent styling for the zero line
Feature importance distribution is relatively uniform - could show more dramatic differences between important and less important features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation:
shap-summary- plotlyImplements the plotly version of
shap-summary.File:
plots/shap-summary/implementations/plotly.pyParent Issue: #2923
🤖 impl-generate workflow