Skip to content

feat: plot pass aligned to P1–P4 — lift bars, similarity heatmap, time-quality scatter - #52

Merged
rxavier merged 1 commit into
mainfrom
feat/plot-pass-p1-p4
Aug 1, 2026
Merged

feat: plot pass aligned to P1–P4 — lift bars, similarity heatmap, time-quality scatter#52
rxavier merged 1 commit into
mainfrom
feat/plot-pass-p1-p4

Conversation

@rxavier

@rxavier rxavier commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

P6 — plot pass aligned with P1–P4. Three new high-value diagnostic plots:

error_lift_bars()

Bar chart of error lift by target class/bin from ErrorReport.lift_by_target. Lift > 1 means the class is over-represented in errors. Dashed line at lift=1 for reference.

from poniard.error_analysis import ErrorAnalyzer
ea = ErrorAnalyzer.from_poniard(clf)
report = ea.analyze(X, y)
PoniardPlotFactory(X, y, clf).error_lift_bars(report.lift_by_target)

similarity_heatmap()

Pairwise prediction-error similarity between estimators via get_predictions_similarity(on_errors=True). Shows which models fail on the same samples (useful for diversity-aware ensembling).

PoniardPlotFactory(X, y, clf).similarity_heatmap(X, y)

time_quality_scatter()

Metric vs fit_time scatter with the Pareto-optimal front highlighted in red. Dummies shown in purple.

PoniardPlotFactory(X, y, clf).time_quality_scatter()

Kept: partial dependence, all existing plots.

Tests

  • 210 tests pass, ruff clean
  • 9 new tests covering all new plots (classifier, regressor, custom metric, top_n, etc.)

…e-quality scatter

P6 — new high-value plots:

- error_lift_bars(): bar chart of error lift by target class/bin
  from ErrorReport.lift_by_target (lift > 1 = over-represented)
- similarity_heatmap(): pairwise prediction-error similarity between
  estimators via get_predictions_similarity
- time_quality_scatter(): metric vs time with Pareto front highlighted

Kept: partial dependence, all existing plots.

210 tests pass, ruff clean.
@rxavier
rxavier merged commit de61786 into main Aug 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant